This is the mail archive of the gdb-patches@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: [MI][patch v2] -break-list to specify "thread-group"


On 12/07/2012 03:36 PM, Pedro Alves wrote:
> On 09/22/2012 01:58 PM, Yao Qi wrote:
>> On 09/21/2012 10:46 PM, Marc Khouzam wrote:
>>> or (if the bp applies to multiple inferiors, which I didn't quite
>>> out how to officially trigger, so I hacked the code to make sure
>>> the output was done properly in that case):
>>>
>>
>> I don't know ether.  I can't think of a case that multiple inferiors share a single pspace.
> 
> See the intro comment to program spaces in progspace.h.  It gives some examples, such
> as after a vfork (and before exit/exec), or some targets that work
> that way, like Ericsson's DICOS.
> 

Mandatory screenshot:

>./gdb ./testsuite/gdb.base/foll-vfork
(gdb) set detach-on-fork off
(gdb) set follow-fork-mode child
(gdb) start
Temporary breakpoint 1 at 0x4006f4: file ../../../src/gdb/testsuite/gdb.base/foll-vfork.c, line 29.
Starting program: /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/foll-vfork
Temporary breakpoint 1, main () at ../../../src/gdb/testsuite/gdb.base/foll-vfork.c:29
29        pid = vfork ();
(gdb) n
[New process 9882]
[Switching to process 9882]
30        if (pid == 0) {
(gdb) info inferiors
  Num  Description       Executable
* 2    process 9882      /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/foll-vfork
        is vfork child of inferior 1
  1    process 9878      /home/pedro/gdb/mygit/build/gdb/testsuite/gdb.base/foll-vfork
        is vfork parent of inferior 2
(gdb) info breakpoints
No breakpoints or watchpoints.
(gdb) b main
Breakpoint 2 at 0x4006f4: file ../../../src/gdb/testsuite/gdb.base/foll-vfork.c, line 29.
(gdb) info breakpoints
Num     Type           Disp Enb Address            What
2       breakpoint     keep y   0x00000000004006f4 in main at ../../../src/gdb/testsuite/gdb.base/foll-vfork.c:29 inf 2, 1
(gdb)

-- 
Pedro Alves


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