mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-05 15:15:42 +00:00
gdb: pass inferior to target_current_description
Make the current inferior reference bubble up one level. Change-Id: I441f954877749dc5a861ab03e881b529dafc2efd
This commit is contained in:
@@ -595,7 +595,7 @@ gdbarch_update_p (struct gdbarch_info info)
|
|||||||
|
|
||||||
/* Check for the current target description. */
|
/* Check for the current target description. */
|
||||||
if (info.target_desc == NULL)
|
if (info.target_desc == NULL)
|
||||||
info.target_desc = target_current_description ();
|
info.target_desc = target_current_description (current_inferior ());
|
||||||
|
|
||||||
new_gdbarch = gdbarch_find_by_info (info);
|
new_gdbarch = gdbarch_find_by_info (info);
|
||||||
|
|
||||||
@@ -654,7 +654,7 @@ set_gdbarch_from_file (bfd *abfd)
|
|||||||
struct gdbarch *gdbarch;
|
struct gdbarch *gdbarch;
|
||||||
|
|
||||||
info.abfd = abfd;
|
info.abfd = abfd;
|
||||||
info.target_desc = target_current_description ();
|
info.target_desc = target_current_description (current_inferior ());
|
||||||
gdbarch = gdbarch_find_by_info (info);
|
gdbarch = gdbarch_find_by_info (info);
|
||||||
|
|
||||||
if (gdbarch == NULL)
|
if (gdbarch == NULL)
|
||||||
|
|||||||
@@ -541,14 +541,12 @@ target_clear_description (void)
|
|||||||
internal_error (_("Could not remove target-supplied description"));
|
internal_error (_("Could not remove target-supplied description"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return the global current target description. This should only be
|
/* See target-descriptions.h. */
|
||||||
used by gdbarch initialization code; most access should be through
|
|
||||||
an existing gdbarch. */
|
|
||||||
|
|
||||||
const struct target_desc *
|
const target_desc *
|
||||||
target_current_description (void)
|
target_current_description (inferior *inf)
|
||||||
{
|
{
|
||||||
target_desc_info *tdesc_info = ¤t_inferior ()->tdesc_info;
|
target_desc_info *tdesc_info = &inf->tdesc_info;
|
||||||
|
|
||||||
if (tdesc_info->fetched)
|
if (tdesc_info->fetched)
|
||||||
return tdesc_info->tdesc;
|
return tdesc_info->tdesc;
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ void target_find_description (void);
|
|||||||
|
|
||||||
void target_clear_description (void);
|
void target_clear_description (void);
|
||||||
|
|
||||||
/* Return the current inferior's target description. This should only
|
/* Return INF's target description. This should only be used by gdbarch
|
||||||
be used by gdbarch initialization code; most access should be
|
initialization code; most access should be through an existing gdbarch. */
|
||||||
through an existing gdbarch. */
|
|
||||||
|
|
||||||
const struct target_desc *target_current_description (void);
|
const target_desc *target_current_description (inferior *inf);
|
||||||
|
|
||||||
/* Record architecture-specific functions to call for pseudo-register
|
/* Record architecture-specific functions to call for pseudo-register
|
||||||
support. If tdesc_use_registers is called and gdbarch_num_pseudo_regs
|
support. If tdesc_use_registers is called and gdbarch_num_pseudo_regs
|
||||||
|
|||||||
Reference in New Issue
Block a user