corelow: Use ptid from regcache instead of inferior_ptid
gdb/ChangeLog: * corelow.c (get_core_register_section): Use ptid from regcache, update doc.
This commit is contained in:
parent
317cd4925a
commit
11a3371447
|
@ -1,3 +1,8 @@
|
||||||
|
2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
|
* corelow.c (get_core_register_section): Use ptid from regcache,
|
||||||
|
update doc.
|
||||||
|
|
||||||
2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
|
2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
|
||||||
|
|
||||||
* bsd-uthread.c (bsd_uthread_fetch_registers,
|
* bsd-uthread.c (bsd_uthread_fetch_registers,
|
||||||
|
|
|
@ -489,11 +489,11 @@ core_detach (struct target_ops *ops, const char *args, int from_tty)
|
||||||
them to core_vec->core_read_registers, as the register set numbered
|
them to core_vec->core_read_registers, as the register set numbered
|
||||||
WHICH.
|
WHICH.
|
||||||
|
|
||||||
If inferior_ptid's lwp member is zero, do the single-threaded
|
If ptid's lwp member is zero, do the single-threaded
|
||||||
thing: look for a section named NAME. If inferior_ptid's lwp
|
thing: look for a section named NAME. If ptid's lwp
|
||||||
member is non-zero, do the multi-threaded thing: look for a section
|
member is non-zero, do the multi-threaded thing: look for a section
|
||||||
named "NAME/LWP", where LWP is the shortest ASCII decimal
|
named "NAME/LWP", where LWP is the shortest ASCII decimal
|
||||||
representation of inferior_ptid's lwp member.
|
representation of ptid's lwp member.
|
||||||
|
|
||||||
HUMAN_NAME is a human-readable name for the kind of registers the
|
HUMAN_NAME is a human-readable name for the kind of registers the
|
||||||
NAME section contains, for use in error messages.
|
NAME section contains, for use in error messages.
|
||||||
|
@ -517,12 +517,13 @@ get_core_register_section (struct regcache *regcache,
|
||||||
char *contents;
|
char *contents;
|
||||||
bool variable_size_section = (regset != NULL
|
bool variable_size_section = (regset != NULL
|
||||||
&& regset->flags & REGSET_VARIABLE_SIZE);
|
&& regset->flags & REGSET_VARIABLE_SIZE);
|
||||||
|
ptid_t ptid = regcache_get_ptid (regcache);
|
||||||
|
|
||||||
xfree (section_name);
|
xfree (section_name);
|
||||||
|
|
||||||
if (ptid_get_lwp (inferior_ptid))
|
if (ptid_get_lwp (ptid))
|
||||||
section_name = xstrprintf ("%s/%ld", name,
|
section_name = xstrprintf ("%s/%ld", name,
|
||||||
ptid_get_lwp (inferior_ptid));
|
ptid_get_lwp (ptid));
|
||||||
else
|
else
|
||||||
section_name = xstrdup (name);
|
section_name = xstrdup (name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue