how to make nemiver hit breakpoints?

how to make nemiver hit breakpoints and show all var values?

I tried the gcc g++ -O0 (o zero, unoptimized) compiler flag, that should grant no src code would be shrunk, but nemiver still misses like 33% of the breakpoints i set…

manytimes nemiver stops after the breakpoint i set too. Other times it just completely misses my src class and jumps to some basic class like string.

and to worsen things, i cant see values inside vectors, and other vars just show “optimized oitput” instead of the value, what is totally useless, any workaround to them?

it seems that macro expansions also mess the breakpoint position. And i read we could generate a precode that have all macros expanded right? Wonder if it could help?

anyother lightweight debugger that dont need to configure anything and just auto finds all sources like nemiver does? I dont want to spend days configuring eclipse or visualcode to work in linux gcc. With nemiver you just run the app and it takes care of showing all src code you need, but missing breakpoints and not showing all var values is really annoying..

ps.: i am trying to debug arx libertatis in linux.

  • 2

    Since your question doesn’t mention it, are you actually using the -g flag to generate debug symbols?

    – 

  • I use a cmakelists option to set unoptimized code in arx libertatis, but i didnt know about -g. As soon i can turn on my pc i will look for it, looks like a good probable hint!

    – 

  • Random open source tool (like debugger named nemiver) does not work like you expect. There are two ways, 1) put up defect report to their issue management or 2) fix it yourself and put up pull request to their repo. What you do 3) write suggestion request to stackoverflow for other tools and/or tutorials is wrong.

    – 

  • 1

    I usually pass -ggdb -O0 -fno-omit-frame_pointer. Does that help?

    – 




  • @sehe it worked! I think -g -O0 only wasant working well, but your line made a difference. I can see values in vectors and all breakpoints seem to be working! I saw a line where nemiver expected another thing from gdb, i will search about that if i still face some problem, thx!

    – 

Even when not optimizing, compilers can omit frame-pointers for simple functions making it so that debuggers cannot distinguish the function entry point on the stack.

I use this combination on my debugging:

-ggdb -O0 -fno-omit-frame-pointer

and it seems to be able to allow me to step through reasonably completely (not using nemiver, but other gdb-based debuggers).

Leave a Comment