This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to show the file being executed?


On Wednesday 24 February 2010 16:46:42, Pedro Alves wrote:
> On Wednesday 24 February 2010 16:41:38, Alfred M. Szmidt wrote:
> >    (top-gdb) info inferiors
> >      Num  Description       Executable
> >    * 1    process 25218     /home/pedro/gdb/baseline/build/gdb/gdb
> > 
> > The original poster wanted the information from `file' as I understood
> > it.

Oh, maybe you're thinking that `info inferiors' wouldn't 
work for this until the program was running.  That was true
on 7.0, no longer on 7.1:

 $./gdb
 :
 (gdb) info inferiors
   Num  Description       Executable
 * 1    <null>

 (gdb) file ./gdb
 Reading symbols from /home/pedro/gdb/baseline/build/gdb/gdb...done.

 (gdb) info inferiors
   Num  Description       Executable
 * 1    <null>            /home/pedro/gdb/baseline/build/gdb/gdb

 (gdb) start
 :
 Temporary breakpoint 1, main (argc=1, argv=0x7fffffffe168) at ../../src/gdb/gdb.c:28
 28        memset (&args, 0, sizeof args);

 (gdb) info inferiors
   Num  Description       Executable
 * 1    process 26761     /home/pedro/gdb/baseline/build/gdb/gdb

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]