aboutsummaryrefslogtreecommitdiff
path: root/gdb/corelow.c
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2017-03-17 13:55:52 -0400
committerSimon Marchi <simon.marchi@ericsson.com>2017-03-17 13:55:52 -0400
commit11a3371447f15af26def26646ad2eb7a4386462d (patch)
tree0290b31e827d41a5bd7830c66632a1d22bc9515e /gdb/corelow.c
parent317cd4925a9d6ef6f8752a771cb56e85ddfb30f0 (diff)
corelow: Use ptid from regcache instead of inferior_ptid
gdb/ChangeLog: * corelow.c (get_core_register_section): Use ptid from regcache, update doc.
Diffstat (limited to 'gdb/corelow.c')
-rw-r--r--gdb/corelow.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdb/corelow.c b/gdb/corelow.c
index ecde9542b5..656c7541a0 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -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
WHICH.
- If inferior_ptid's lwp member is zero, do the single-threaded
- thing: look for a section named NAME. If inferior_ptid's lwp
+ If ptid's lwp member is zero, do the single-threaded
+ thing: look for a section named NAME. If ptid's lwp
member is non-zero, do the multi-threaded thing: look for a section
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
NAME section contains, for use in error messages.
@@ -517,12 +517,13 @@ get_core_register_section (struct regcache *regcache,
char *contents;
bool variable_size_section = (regset != NULL
&& regset->flags & REGSET_VARIABLE_SIZE);
+ ptid_t ptid = regcache_get_ptid (regcache);
xfree (section_name);
- if (ptid_get_lwp (inferior_ptid))
+ if (ptid_get_lwp (ptid))
section_name = xstrprintf ("%s/%ld", name,
- ptid_get_lwp (inferior_ptid));
+ ptid_get_lwp (ptid));
else
section_name = xstrdup (name);