This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MI][patch v2] -break-list to specify "thread-group"
- From: Pedro Alves <palves at redhat dot com>
- Cc: Yao Qi <yao at codesourcery dot com>, Marc Khouzam <marc dot khouzam at ericsson dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 07 Dec 2012 15:44:38 +0000
- Subject: Re: [MI][patch v2] -break-list to specify "thread-group"
- References: <F7CE05678329534C957159168FA70DEC5E11404FDC@EUSAACMS0703.eamcs.ericsson.se> <F7CE05678329534C957159168FA70DEC5E11404FE0@EUSAACMS0703.eamcs.ericsson.se> <F7CE05678329534C957159168FA70DEC5E11B177EA@EUSAACMS0703.eamcs.ericsson.se> <505DB611.70706@codesourcery.com> <50C20D19.1070704@redhat.com>
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