aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorPedro Alves <pedro@palves.net>2022-12-03 16:20:51 +0000
committerPedro Alves <pedro@palves.net>2023-02-27 19:12:28 +0000
commitfb6d30e013edc16cc830447a7115c0a5189f753f (patch)
treea6134b125125b1352a6c4110c7224bcee39b7c6b /gdb/procfs.c
parent13ee5410707d0487fbd97c91b83280d169b5a654 (diff)
downloadbinutils-fb6d30e013edc16cc830447a7115c0a5189f753f.zip
binutils-fb6d30e013edc16cc830447a7115c0a5189f753f.tar.gz
binutils-fb6d30e013edc16cc830447a7115c0a5189f753f.tar.bz2
Tweak "Using the running image of ..." output
Currently, "info files" and "info program" on a few native targets show: (gdb) info files Symbols from "/home/pedro/gdb/tests/threads". Native process: Using the running image of child Thread 0x7ffff7d89740 (LWP 1097968). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... (gdb) info program Using the running image of child Thread 0x7ffff7d89740 (LWP 1097968). ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Program stopped at 0x555555555278. ... This patch changes them to: (gdb) info files Symbols from "/home/pedro/gdb/tests/threads". Native process: Using the running image of child process 1097968. ^^^^^^^^^^^^^^^ ... (gdb) info program Using the running image of child process 1097968. ^^^^^^^^^^^^^^^ Program stopped at 0x555555555278. ... ... which I think makes a lot more sense in this context. The "info program" manual entry even says: "Display information about the status of your program: whether it is running or not, what process it is, and why it stopped." ^^^^^^^^^^^^^ This change affects ptrace targets, procfs targets, and Windows. Approved-By: Simon Marchi <simon.marchi@efficios.com> Change-Id: I6aab061ff494a84ba3398cf98fd49efd7a6ec1ca
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 2c009c3..741e62a 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -2533,7 +2533,7 @@ procfs_target::files_info ()
gdb_printf (_("\tUsing the running image of %s %s via /proc.\n"),
inf->attach_flag? "attached": "child",
- target_pid_to_str (inferior_ptid).c_str ());
+ target_pid_to_str (ptid_t (inf->pid)).c_str ());
}
/* Make it die. Wait for it to die. Clean up after it. Note: this