This is the mail archive of the gdb-prs@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]

[Bug breakpoints/17543] New: could not set breakpoint in multi-inferior case


https://sourceware.org/bugzilla/show_bug.cgi?id=17543

            Bug ID: 17543
           Summary: could not set breakpoint in multi-inferior case
           Product: gdb
           Version: 7.7
            Status: NEW
          Severity: normal
          Priority: P2
         Component: breakpoints
          Assignee: unassigned at sourceware dot org
          Reporter: tromey at sourceware dot org

I don't have a very easy to reproduce test for this.
I was debugging a firefox test case using multi-inferior
debugging.  This was set up using:

  set detach-on-fork off
  set target-async on
  set non-stop on
  set pagination off
  set schedule-multiple on

Then I did "catch exec" and ran firefox.

The test case causes a fork+exec of a plugin container process.
gdb caught this and I tried to set a new breakpoint:

Catchpoint 1 (exec'd
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/plugin-container),
0x00007ffff7dde1f0 in _start () from /lib64/ld-linux-x86-64.so.2
info b
Num     Type           Disp Enb Address            What
1       catchpoint     keep y                      exec, program
"/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/plugin-container" 
    catchpoint already hit 1 time
(gdb) info infer
  Num  Description       Executable        
  3    process 14261    
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/plugin-container 
* 1    process 14203    
/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/firefox 
(gdb) infer 3
[Switching to inferior 3 [process 14261]
(/home/tromey/firefox-git/gecko-dev/obj-x86_64-unknown-linux-gnu/dist/bin/plugin-container)]
[Switching to thread 51 (Thread 0x7fffe85f6700 (LWP 14261))] 
#0  0x00007ffff7dde1f0 in _start () from /lib64/ld-linux-x86-64.so.2
(gdb) b PluginModuleChild::AnswerNP_Shutdown
Function "PluginModuleChild::AnswerNP_Shutdown" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 2 (PluginModuleChild::AnswerNP_Shutdown) pending.
(gdb) b main
Breakpoint 3 at 0x402709: main. (2 locations)
Warning:
Cannot insert breakpoint 3.
Cannot access memory at address 0x403731

(gdb) b XRE_InitChildProcess
Breakpoint 4 at 0x4023d0 (2 locations)
Warning:
Cannot insert breakpoint 3.
Cannot access memory at address 0x403731
Cannot insert breakpoint 4.
Temporarily disabling shared library breakpoints:
breakpoint #4


One note here is that you can see how I skilfully avoided
bug #13700 -- but I've had to trash several other debug
sessions today due to forgetting this.

Anyway the bug at hand is that breakpoint 3 and breakpoint 4
are somehow set improperly.  And, this prevents further work:


(gdb) c -a
Continuing.
Warning:
Cannot insert breakpoint 3.
Cannot access memory at address 0x403731


I worked around it with "catch load" and then setting the
breakpoints when a shared library is loaded.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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