How to show the file being executed?

Stefano Sabatini
Sat Feb 20 12:26:00 GMT 2010

Hi all,

I'm running gdb 7.0 and first of all let me thank you, it's simply
*AWESOME*, reversible debugging and scripting are some features we
always dreamt for, and now they're finally available to all the free
world, thanks!!

I have a small problem, I need to show the name of the file debugged
in a gdb script, and info target looks overkill as it shows too much

(gdb) show version
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
(gdb) info target
Symbols from "/home/stefano/src/PROGRAM".
Unix child process:
	Using the running image of child Thread 0xb5f33b70 (LWP 8998).
	While running this, GDB does not access memory from...
Local exec file:
	`/home/stefano/src/PROGRAM', file type elf32-i386.
	Entry point: 0x804bc70
	0x08048134 - 0x08048147 is .interp
	0x08048148 - 0x08048168 is .note.ABI-tag
	0x08048168 - 0x0804818c is

There is some way to show *only* this information?, otherwise I suggest
to implement a show file command.


More information about the Gdb mailing list