public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Re: Gdb crashing or not attaching in Netbeans
@ 2012-05-22 10:55 erupter
  0 siblings, 0 replies; 3+ messages in thread
From: erupter @ 2012-05-22 10:55 UTC (permalink / raw)
  To: gdb

  Finally I got logs!
I'm asking for help in understanding what is happening.
First is a correct log, as to say a log of a working debugging session up to 
the first break point.
Then a log of a crashed debugging session, from which the debugger never 
recovers (closing the IDE, restarting the computer, nothing solves the debugger 
crash. Just clearing the IDE user settings folder).

So here is a working log.
=thread-group-added,id="i1"
~"GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04\n"
~"Copyright (C) 2012 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.
html>\nThis is free software: you are free to change and redistribute it.
\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"
\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nFor bug reporting 
instructions, please see:\n"
~"<http://bugs.launchpad.net/gdb-linaro/>.\n"
&"/home/erupter/.gdbinit: No such file or directory.\n"
(gdb) 
2-list-features
3-gdb-set print repeat 0
4-gdb-set backtrace limit 1024
5-gdb-set print elements 0
6-environment-directory ".:/usr/local/include/player-3.1:
/usr/local/include/Stage-4.1"
7-file-exec-and-symbols  "/home/erupter/NetBeansProjects/PlayerStage 
Test/dist/Debug/GNU-Linux-x86/playerstage_test"
2^done,features=["frozen-varobjs","pending-breakpoints","thread-info","data-
read-memory-bytes","breakpoint-notifications","ada-task-info","python"]
(gdb) 
3^done
(gdb) 
4^done
(gdb) 
5^done
(gdb) 
&"Warning: /home/erupter/NetBeansProjects/PlayerStage Test/.:
/usr/local/include/player-3.1:/usr/local/include/Stage-4.1: No such file or 
directory.\n"
6^done,source-path="/home/erupter/NetBeansProjects/PlayerStage Test/.:
/usr/local/include/player-3.1:/usr/local/include/Stage-4.1:$cdir:$cwd"
(gdb) 
7^done
(gdb) 
8-file-list-exec-source-file
8^done,line="10",file="main.c",fullname="
/home/erupter/NetBeansProjects/PlayerStage Test/main.c",macro-info="0"
(gdb) 
9cd /home/erupter/NetBeansProjects/PlayerStage Test
10-exec-arguments 
11set environment $LD_LIBRARY_PATH=/usr/local/lib64;/usr/local/lib;/usr/lib;
/usr/lib64
12-break-insert -f "main.c:35"
&"cd /home/erupter/NetBeansProjects/PlayerStage Test\n"
~"Working directory /home/erupter/NetBeansProjects/PlayerStage Test.\n"
9^done
(gdb) 
10^done
(gdb) 
&"set environment $LD_LIBRARY_PATH=/usr/local/lib64;/usr/local/lib;/usr/lib;
/usr/lib64\n"
11^done
(gdb) 
12^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="
0x0000000000401109",func="main",file="main.c",fullname="
/home/erupter/NetBeansProjects/PlayerStage Test/main.c",line="35",times="0",
original-location="main.c:35"}
(gdb) 
13-break-insert -t _start
13^done,bkpt={number="2",type="breakpoint",disp="del",enabled="y",addr="
0x0000000000400f60",at="<_start>",times="0",original-location="_start"}
(gdb) 
14-exec-run
=thread-group-started,id="i1",pid="7246"
=thread-created,id="1",group-id="i1"
14^running
*running,thread-id="all"
(gdb) 
=library-loaded,id="/lib64/ld-linux-x86-64.so.2",target-name="/lib64/ld-linux-
x86-64.so.2",host-name="/lib64/ld-linux-x86-64.so.2",symbols-loaded="0",thread-
group="i1"
=library-loaded,id="/usr/local/lib64/libplayerc.so.3.1",target-name="
/usr/local/lib64/libplayerc.so.3.1",host-name="/usr/local/lib64/libplayerc.so.
3.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libm.so.6",target-name="/lib/x86_64-
linux-gnu/libm.so.6",host-name="/lib/x86_64-linux-gnu/libm.so.6",symbols-
loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libc.so.6",target-name="/lib/x86_64-
linux-gnu/libc.so.6",host-name="/lib/x86_64-linux-gnu/libc.so.6",symbols-
loaded="0",thread-group="i1"
=library-loaded,id="/usr/local/lib64/libplayerinterface.so.3.1",target-name="
/usr/local/lib64/libplayerinterface.so.3.1",host-name="
/usr/local/lib64/libplayerinterface.so.3.1",symbols-loaded="0",thread-group="
i1"
=library-loaded,id="/usr/local/lib64/libplayerwkb.so.3.1",target-name="
/usr/local/lib64/libplayerwkb.so.3.1",host-name="/usr/local/lib64/libplayerwkb.
so.3.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libz.so.1",target-name="/lib/x86_64-
linux-gnu/libz.so.1",host-name="/lib/x86_64-linux-gnu/libz.so.1",symbols-
loaded="0",thread-group="i1"
=library-loaded,id="/usr/local/lib64/libplayerjpeg.so.3.1",target-name="
/usr/local/lib64/libplayerjpeg.so.3.1",host-name="
/usr/local/lib64/libplayerjpeg.so.3.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/local/lib64/libplayercommon.so.3.1",target-name="
/usr/local/lib64/libplayercommon.so.3.1",host-name="
/usr/local/lib64/libplayercommon.so.3.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/libgeos_c.so.1",target-name="/usr/lib/libgeos_c.
so.1",host-name="/usr/lib/libgeos_c.so.1",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libjpeg.so.8",target-name="
/usr/lib/x86_64-linux-gnu/libjpeg.so.8",host-name="/usr/lib/x86_64-linux-
gnu/libjpeg.so.8",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/usr/lib/libgeos-3.2.2.so",target-name="/usr/lib/libgeos-
3.2.2.so",host-name="/usr/lib/libgeos-3.2.2.so",symbols-loaded="0",thread-
group="i1"
=library-loaded,id="/usr/lib/x86_64-linux-gnu/libstdc++.so.6",target-name="
/usr/lib/x86_64-linux-gnu/libstdc++.so.6",host-name="/usr/lib/x86_64-linux-
gnu/libstdc++.so.6",symbols-loaded="0",thread-group="i1"
=library-loaded,id="/lib/x86_64-linux-gnu/libgcc_s.so.1",target-name="
/lib/x86_64-linux-gnu/libgcc_s.so.1",host-name="/lib/x86_64-linux-gnu/libgcc_s.
so.1",symbols-loaded="0",thread-group="i1"
=breakpoint-modified,bkpt={number="2",type="breakpoint",disp="del",enabled="y",
addr="0x0000000000400f60",at="<_start>",times="1",original-location="_start"}
*stopped,reason="breakpoint-hit",disp="del",bkptno="2",frame={addr="
0x0000000000400f60",func="_start",args=[]},thread-id="1",stopped-threads="all",
core="0"
=breakpoint-deleted,id="2"
(gdb) 
15-exec-continue
15^running
*running,thread-id="all"
(gdb) 
No answer for: 14-exec-run
=library-loaded,id="/lib/x86_64-linux-gnu/libnss_files.so.2",target-name="
/lib/x86_64-linux-gnu/libnss_files.so.2",host-name="/lib/x86_64-linux-
gnu/libnss_files.so.2",symbols-loaded="0",thread-group="i1"
=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="
y",addr="0x0000000000401109",func="main",file="main.c",fullname="
/home/erupter/NetBeansProjects/PlayerStage Test/main.c",line="35",times="1",
original-location="main.c:35"}
*stopped,reason="breakpoint-hit",disp="keep",bkptno="1",frame={addr="
0x0000000000401109",func="main",args=[{name="argc",value="1"},{name="argv",
value="0x7fffffffe4b8"}],file="main.c",fullname="
/home/erupter/NetBeansProjects/PlayerStage Test/main.c",line="35"},thread-id="
1",stopped-threads="all",core="0"
(gdb) 
16-stack-list-frames
16^done,stack=[frame={level="0",addr="0x0000000000401109",func="main",file="
main.c",fullname="/home/erupter/NetBeansProjects/PlayerStage Test/main.c",line="
35"}]
(gdb) 
No answer for: 15-exec-continue
17-stack-list-arguments 1
17^done,stack-args=[frame={level="0",args=[{name="argc",value="1"},{name="
argv",value="0x7fffffffe4b8"}]}]
(gdb) 
\x01


And now a non working log.
=thread-group-added,id="i1"
~"GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04\n"
~"Copyright (C) 2012 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.
html>\nThis is free software: you are free to change and redistribute it.
\nThere is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"
\nand \"show warranty\" for details.\n"
~"This GDB was configured as \"x86_64-linux-gnu\".\nFor bug reporting 
instructions, please see:\n"
~"<http://bugs.launchpad.net/gdb-linaro/>.\n"
&"/home/erupter/.gdbinit: No such file or directory.\n"
(gdb) 
2-list-features
3-gdb-set print repeat 0
4-gdb-set backtrace limit 1024
5-gdb-set print elements 0
6-environment-directory ".:/usr/local/include/player-3.1:
/usr/local/include/Stage-4.1"
7-file-exec-and-symbols  "/home/erupter/NetBeansProjects/PlayerStage 
Test/dist/Debug/GNU-Linux-x86/playerstage_test"
2^done,features=["frozen-varobjs","pending-breakpoints","thread-info","data-
read-memory-bytes","breakpoint-notifications","ada-task-info","python"]
(gdb) 
3^done
(gdb) 
4^done
(gdb) 
5^done
(gdb) 
&"Warning: /home/erupter/NetBeansProjects/PlayerStage Test/.:
/usr/local/include/player-3.1:/usr/local/include/Stage-4.1: No such file or 
directory.\n"
6^done,source-path="/home/erupter/NetBeansProjects/PlayerStage Test/.:
/usr/local/include/player-3.1:/usr/local/include/Stage-4.1:$cdir:$cwd"
(gdb) 
7^done
(gdb) 
8-file-list-exec-source-file
8^done,line="10",file="main.c",fullname="
/home/erupter/NetBeansProjects/PlayerStage Test/main.c",macro-info="0"
(gdb) 
9cd /home/erupter/NetBeansProjects/PlayerStage Test
10-exec-arguments 
11set environment $LD_LIBRARY_PATH=/usr/local/lib64;/usr/local/lib;/usr/lib;
/usr/lib64
12-break-insert -f "main.c:23"
13-var-create - @ sonar
14-var-update --all-values * 
15-var-create - @ client
16-var-update --all-values * 
&"cd /home/erupter/NetBeansProjects/PlayerStage Test\n"
17-break-insert -t _start
~"Working directory /home/erupter/NetBeansProjects/PlayerStage Test.\n"
9^done
(gdb) 
10^done
(gdb) 
&"set environment $LD_LIBRARY_PATH=/usr/local/lib64;/usr/local/lib;/usr/lib;
/usr/lib64\n"
11^done
(gdb) 
12^done,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="
0x000000000040109d",func="main",file="main.c",fullname="
/home/erupter/NetBeansProjects/PlayerStage Test/main.c",line="23",times="0",
original-location="main.c:23"}
(gdb) 
13^done,name="var1",numchild="21",value="0x0",type="playerc_ranger_t *",
has_more="0"
(gdb) 
~"/build/buildd/gdb-7.4-2012.04/gdb/thread.c:613: internal-error: 
is_thread_state: Assertion `tp' failed.\nA problem internal to GDB has been 
detected,\nfurther debugging may prove unreliable.\nQuit this debugging 
session? "
~"(y or n) [answered Y; input not from terminal]\n"
18-var-show-attributes "var1"
~"/build/buildd/gdb-7.4-2012.04/gdb/thread.c:613: internal-error: 
is_thread_state: Assertion `tp' failed.\nA problem internal to GDB has been 
detected,\nfurther debugging may prove unreliable.\nCreate a core file of GDB? 
"
~"(y or n) [answered Y; input not from terminal]\n"
  
This is all being done automatically by Netbeans IDE.
When this happens, I have a "crash notification" from the System notification 
helper too.
Thanks and regards
Claudio Carbone

>----Messaggio originale----
>Da: erupter@libero.it
>Data: 17/05/2012 16.38
>A: <gdb@sourceware.org>
>Ogg: Gdb crashing or not attaching in Netbeans
>
>Hello.
>I've used GDB as a standalone debugger before, maybe with one amateur 
>interface until recently I discovered Netbeans.
>During development of a program suddenly debugging stopped working.
>If I load a simple hello world, GDB works fine.
>In the program I'm re-writing now (old program whose external libraries got 
>changed) GDB doesn't want to work anymore.
>Now Netbeans doesn't provide any info at all to help me debug this, so I'm 
>asking here: how can I gather information on this kind of malfunction?
>
>It *seems* that there is a problem with the source of a library.
>Meaning that if I exclude the include (and the relevant code which is most 
of 
>it) GDB works.
>The moment I include that external source, it stops working.
>Files are there though and compilation goes without problems.
>
>I'm really in the dark here.
>
>Best regards
>Claudio


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Gdb crashing or not attaching in Netbeans
  2012-05-17 14:38 erupter
@ 2012-05-17 20:22 ` Tom Tromey
  0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2012-05-17 20:22 UTC (permalink / raw)
  To: erupter; +Cc: gdb

>>>>> "Claudio" == erupter@libero it <erupter@libero.it> writes:

Claudio> Now Netbeans doesn't provide any info at all to help me debug
Claudio> this, so I'm asking here: how can I gather information on this
Claudio> kind of malfunction?

One way is to try to reproduce the problem outside of Netbeans.

Or, if gdb is crashing, you could enable core dumps.

Or, you can ask the Netbeans people for advice.  Often GUIs using gdb
have debugging modes where they display the MI streams.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Gdb crashing or not attaching in Netbeans
@ 2012-05-17 14:38 erupter
  2012-05-17 20:22 ` Tom Tromey
  0 siblings, 1 reply; 3+ messages in thread
From: erupter @ 2012-05-17 14:38 UTC (permalink / raw)
  To: gdb

Hello.
I've used GDB as a standalone debugger before, maybe with one amateur 
interface until recently I discovered Netbeans.
During development of a program suddenly debugging stopped working.
If I load a simple hello world, GDB works fine.
In the program I'm re-writing now (old program whose external libraries got 
changed) GDB doesn't want to work anymore.
Now Netbeans doesn't provide any info at all to help me debug this, so I'm 
asking here: how can I gather information on this kind of malfunction?

It *seems* that there is a problem with the source of a library.
Meaning that if I exclude the include (and the relevant code which is most of 
it) GDB works.
The moment I include that external source, it stops working.
Files are there though and compilation goes without problems.

I'm really in the dark here.

Best regards
Claudio

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-22 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 10:55 Gdb crashing or not attaching in Netbeans erupter
  -- strict thread matches above, loose matches on Subject: below --
2012-05-17 14:38 erupter
2012-05-17 20:22 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).