Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Debug stepping error: "Cannot insert breakpoint -23": (7 Items)
   
Debug stepping error: "Cannot insert breakpoint -23"  
Hello Everybody,

I managed to debug sources, which where not build within the Momentics IDE (instead I was using an external make 
environment). When debugging, I can set
breakpoints, see the variables, etc...

But when I am trying to step through the sourcecode, I get these error messages:

  Warning:
  Cannot insert breakpoint -23.
  Error accessing memory address 0x1fa00: Operation not permitted.
  Cannot insert breakpoint -24.
  Error accessing memory address 0x1f202: Operation not permitted.
  Cannot insert breakpoint -25.
  Error accessing memory address 0x174b8: Operation not permitted.

Did anybody encounter this problem before and could provide a solution?

Thanks in advance,
Michael
RE: Debug stepping error: "Cannot insert breakpoint -23"  
Could be some problems with library or binary mismatching between host and
target (make sure they are exactly the same, including libc). 
If they match try new 6.7 debugger available on foundry (backup old one
before applying the patch).
Re: RE: Debug stepping error: "Cannot insert breakpoint -23"  
Hello Elena,

Thank you for your quick reply. 

I was already using the gdb 6.7.
By now, I re-installed QNX on the target and on the Windows Host PC from the same CDs. Thus, I am pretty sure, that the 
library versions are the same. But the error still shows up, when trying to step through the code.

Could the error code "-23" give any hint about the problem?

Regards,
Michael
Re: RE: Debug stepping error: "Cannot insert breakpoint -23"  
Hello,

Could you give us more detail:

What is your target platform (cpu, Neutrino version)?
What is the gcc --version?
What is your host (where gdb is running)?
Which gdb 6.7 (u1 or u2)?

This error indicates that gdb's idea of target's address space is wrong. It usually occurs when shared library is not 
found or when host/target libraries differ, but might be something else. 

---
Aleksandar

Re: RE: Debug stepping error: "Cannot insert breakpoint -23"  
What is compiler version? 23 is a breakpoint number not an error code I think.
Are these messages in console? Can you enable full gdb log? (if you using IDE 4.5 you can enable it from launch 
configuration, otherwise you need to run eclipse with -debug optionsFile option and set a flag to enable gdb commands 
verbose mode in the file: org.eclipse.cdt.debug.mi.core/debug=true and watch the console)
Re: RE: Debug stepping error: "Cannot insert breakpoint -23"  
Hello,

Below, you can see my system configuration...

Host:           Windows XP, with Momentics 6.3.2
IDE:            4.0.1
Target:         QNX localhost 6.3.2 2006/03/16-14:19:50EST x86pc x86
gdb version:  gdb_6_7_u1
gcc version:   2.95.3

I am not sure, if I already enabled full gdb log yet, but I get these messages at the console after I started debugging:


-----------------------------------
 MsgNak received - resending
 Remote target is little-endian
 warning: Unable to find dynamic linker breakpoint function.
 GDB will be unable to debug shared library initializers
 and track explicitly loaded dynamic code.
 attach 2404402
 Error while mapping shared library sections:
 libscuipc.so: No such file or directory.
 Error while mapping shared library sections:
 libscugl.so: No such file or directory. 
 warning: Unable to find dynamic linker breakpoint function.
 GDB will be unable to debug shared library initializers
 and track explicitly loaded dynamic code.
 0xb032f821 in MsgReceivev () from  
 D:/Programme/Programmieren/QNX6.3.2/target/qnx6/x86/lib/libc.so.2
-----------------------------------

The libraries mentioned as 'missing' belong to the software I a mworking with, but I don't need to debug them. Thus, I 
didn't add them to the Momentics Project.

Regards,
Michael
Re: RE: Debug stepping error: "Cannot insert breakpoint -23"  
Hello again,

While writing the last message, I uninstalled the QNX Momentics 6.3.0 IDE, which was installed at the same time as the 6
.3.2 version before. Now stepping works!

Your hint with the libraries was right. The shared libraries were still loaded from the 6.3.0 directories and not from 6
.3.2.

Thanks again for your help!

Best regards,
Michael