Operating System - HP-UX
1833405 Members
3006 Online
110052 Solutions
New Discussion

Help with GDB debugging shared libs from an attached process

 
steveo622
Advisor

Help with GDB debugging shared libs from an attached process

Hello,

I am trying to debug one of my shared libraries that gets called from a java application through JNI to C++.

I enter the gdb environment and attach to the running java process. I set my dir to where the necessary source code is and then set my breakpoint. Here is a listing of the output from gdb...

(gdb) b /home2/scolbert/MMAXWeb5.2/PlanningServer/PlanningEngine/SubcubeDataMgr.cpp:228
Breakpoint 2 at 0xc20c2a0c: file SubcubeDataMgr.cpp, line 228.
(gdb) cont
Continuing.
warning: reading `flags' register: Protocol error
warning: reading `r31' register: Protocol error
warning: Cannot insert breakpoint 2:
warning: Temporarily disabling shared library breakpoints:
warning: breakpoint #2
warning: reading `flags' register: Protocol error
warning: reading `r31' register: Protocol error


Notice that my breakpoint gets disabled. WHy is that happening? How can I get past this issue?

Thanks,


Steve Colbert
1 REPLY 1
Subhendu
Occasional Advisor

Re: Help with GDB debugging shared libs from an attached process

Hi,
Please make sure you compile with -g0 option.
Thanks and regards