digitalmars.D.learn - D and GDB
- Russel Winder via Digitalmars-d-learn (19/19) Jun 04 2017 I thought I had left SIGSEGV debugging behind, but it seems not.
- ketmar (2/11) Jun 04 2017 maybe 'cause backtrace is called with `bt` command? ;-)
- Russel Winder via Digitalmars-d-learn (15/17) Jun 04 2017 [=E2=80=A6]
- Russel Winder via Digitalmars-d-learn (32/35) Jun 04 2017 Sadly even using the correct command, I am not getting any data that
- Basile B. (5/22) Jun 04 2017 you have to pipe the output to ddemangle. Personally i don't know
- Paolo Invernizzi (5/12) Jun 04 2017 at `libdvbv5.d:140` you are calling the native
- H. S. Teoh via Digitalmars-d-learn (12/31) Jun 04 2017 Here's the output:
- Basile B. (8/12) Jun 04 2017 Trivial i don't know but i had the feeling that the OP complained
- H. S. Teoh via Digitalmars-d-learn (7/17) Jun 05 2017 'cos I run dmd off git HEAD, so I've no idea what it ships with/without.
- Mike Wey (5/9) Jun 05 2017 Recent? versions of gdb also support demangling D symbols, it should
- Jacob Carlborg (5/13) Jun 04 2017 If you refer to ??, I'm guessing that's inside libdvbv5.so which might
- Stefan Koch (3/9) Jun 04 2017 My guess is a null pointer :)
I thought I had left SIGSEGV debugging behind, but it seems not. However whilst the C++/CLion debug tooling is excellent, D seems to be without. I guess there must be some gdb magic I am missing, but: Program received signal SIGSEGV, Segmentation fault. 0x00007fffffffc788 in ?? () gdb>b Breakpoint 1 at 0x7fffffffc788 gdb> Not the most illuminating backtrace I have seen. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jun 04 2017
Russel Winder wrote:I thought I had left SIGSEGV debugging behind, but it seems not. However whilst the C++/CLion debug tooling is excellent, D seems to be without. I guess there must be some gdb magic I am missing, but: Program received signal SIGSEGV, Segmentation fault. 0x00007fffffffc788 in ?? () gdb>b Breakpoint 1 at 0x7fffffffc788 gdb> Not the most illuminating backtrace I have seen.maybe 'cause backtrace is called with `bt` command? ;-)
Jun 04 2017
On Sun, 2017-06-04 at 20:31 +0300, ketmar via Digitalmars-d-learn wrote:=20[=E2=80=A6]maybe 'cause backtrace is called with `bt` command? ;-):-) Well it is 14 years since I started a gdb instance. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jun 04 2017
On Sun, 2017-06-04 at 20:31 +0300, ketmar via Digitalmars-d-learn wrote:=20 =20 maybe 'cause backtrace is called with `bt` command? ;-)Sadly even using the correct command, I am not getting any data that 86_64-linux-gnu/libdvbv5.so.0 PS6dvb_fe15dvb_v5_fe_parmsPS8dvb_file9dvb_entryiPUPvPS6dvb_fe15dvb_v5_fe_pa= rmsZikkZS8libdvbv515ScanHandler_Ptr (this=3D..., frontendParameters=3D0x555= 5557b4830,=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0entry=3D0x5555557aa0b0, dmx_fd=3D4, check_frontend= =3D0x55555556f730 <checkFrontend>, other_nit=3D0, timeout_multiplier=3D1) a= t /home/users/russel/Repositories/Git/Masters/DVBTune/source/libdvbv5.d:140 ibdvbv510FrontendIdxkxkxkxkxbZC8channels12ChannelsData (this=3D..., fei=3D.= .., other_nit=3D0, timeout_multiplier=3D1, get_detected=3D1, get_nit=3D1,= =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0dont_add_new_frequencies=3Dfalse) at /home/users/ru= ssel/Repositories/Git/Masters/DVBTune/source/channels.d:159 el/Repositories/Git/Masters/DVBTune/source/main.d:35 --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 41 Buckmaster Road m: +44 7770 465 077 xmpp: russel winder.org.uk London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
Jun 04 2017
On Sunday, 4 June 2017 at 18:13:41 UTC, Russel Winder wrote:Sadly even using the correct command, I am not getting any data /usr/lib/x86_64-linux-gnu/libdvbv5.so.0 _D8libdvbv515ScanHandler_Ptr6__ctorMFNcPS6dvb_fe15dvb_v5_fe_parmsPS8dvb_file9dvb_entryiPUPvPS6dvb_fe15dvb_v5_fe_parmsZikkZS8libdv v515ScanHandler_Ptr (this=..., frontendParameters=0x5555557b4830, Â Â Â Â entry=0x5555557aa0b0, dmx_fd=4, check_frontend=0x55555556f730 <checkFrontend>, other_nit=0, timeout_multiplier=1) at /home/users/russel/Repositories/Git/Masters/DVBTune/source/libdvbv5.d:140 _D8channels15TransmitterData4scanMFxS8libdvbv510FrontendIdxkxkxkxkxbZC8ch nnels12ChannelsData (this=..., fei=..., other_nit=0, timeout_multiplier=1, get_detected=1, get_nit=1, Â Â Â Â dont_add_new_frequencies=false) at /home/users/russel/Repositories/Git/Masters/DVBTune/source/channels.d:159 /home/users/russel/Repositories/Git/Masters/DVBTune/source/main.d:35you have to pipe the output to ddemangle. Personally i don't know how to do this by hand since my IDE does the task automatically (http://bbasile.github.io/Coedit/widgets_gdb_commander). Also i suppose you compiled with -g -gs ?
Jun 04 2017
On Sunday, 4 June 2017 at 19:24:17 UTC, Basile B. wrote:On Sunday, 4 June 2017 at 18:13:41 UTC, Russel Winder wrote:at `libdvbv5.d:140` you are calling the native `dvb_scan_transponder` in `libdvbv5.so` that's segfaulting... Try to just log the arguments values you are using there... /Paolo[...]you have to pipe the output to ddemangle. Personally i don't know how to do this by hand since my IDE does the task automatically (http://bbasile.github.io/Coedit/widgets_gdb_commander). Also i suppose you compiled with -g -gs ?
Jun 04 2017
On Sun, Jun 04, 2017 at 07:24:17PM +0000, Basile B. via Digitalmars-d-learn wrote: [...]you have to pipe the output to ddemangle.Here's the output:The ?? on the first line is probably a function that has no debugging info, perhaps from a library that wasn't compiled with debugging symbols added./usr/lib/x86_64-linux-gnu/libdvbv5.so.0 libdvbv5.ScanHandler_Ptr.__ctor(dvb_fe.dvb_v5_fe_parms*, dvb_file.dvb_entry*, int, extern (C) int function(void*, dvb_fe.dvb_v5_fe_parms*)*, uint, uint) (this=..., frontendParameters=0x5555557b4830, entry=0x5555557aa0b0, dmx_fd=4, check_frontend=0x55555556f730 <checkFrontend>, other_nit=0, timeout_multiplier=1) at /home/users/russel/Repositories/Git/Masters/DVBTune/source/libdvbv5.d:140 channels.TransmitterData.scan(const(libdvbv5.FrontendId), const(uint), const(uint), const(uint), const(uint), const(bool)) (this=..., fei=..., other_nit=0, timeout_multiplier=1, get_detected=1, get_nit=1, dont_add_new_frequencies=false) at /home/users/russel/Repositories/Git/Masters/DVBTune/source/channels.d:159 /home/users/russel/Repositories/Git/Masters/DVBTune/source/main.d:35Personally i don't know how to do this by hand since my IDE does the task automatically (http://bbasile.github.io/Coedit/widgets_gdb_commander).It can't be any more trivial than just running ddemangle, which is found in the dlang/tools repo on github. (Arguably this should be shipped by default with dmd... or is it already?) T -- My program has no bugs! Only unintentional features...
Jun 04 2017
On Monday, 5 June 2017 at 01:07:51 UTC, H. S. Teoh wrote:It can't be any more trivial than just running ddemangle, which is found in the dlang/tools repo on github.Trivial i don't know but i had the feeling that the OP complained about the stack trace not being readable although all the answers went in another direction.(Arguably this should be shipped by default with dmd... or is it already?)Of course it is. Currently i don't use it much but at the beginning of 2017 it's been very useful to me, to process valgrind's output, dozen and dozen of times. How can anyone ignore that it's shipped with dmd ?
Jun 04 2017
On Mon, Jun 05, 2017 at 05:34:14AM +0000, Basile B. via Digitalmars-d-learn wrote:On Monday, 5 June 2017 at 01:07:51 UTC, H. S. Teoh wrote:[...]It can't be any more trivial than just running ddemangle, which is found in the dlang/tools repo on github.'cos I run dmd off git HEAD, so I've no idea what it ships with/without. :-D T -- My program has no bugs! Only undocumented features...(Arguably this should be shipped by default with dmd... or is it already?)Of course it is. Currently i don't use it much but at the beginning of 2017 it's been very useful to me, to process valgrind's output, dozen and dozen of times. How can anyone ignore that it's shipped with dmd ?
Jun 05 2017
On 06/05/2017 03:07 AM, H. S. Teoh via Digitalmars-d-learn wrote:It can't be any more trivial than just running ddemangle, which is found in the dlang/tools repo on github. (Arguably this should be shipped by default with dmd... or is it already?)Recent? versions of gdb also support demangling D symbols, it should detect it's D when you compile with -g. -- Mike Wey
Jun 05 2017
On 2017-06-04 20:13, Russel Winder via Digitalmars-d-learn wrote:On Sun, 2017-06-04 at 20:31 +0300, ketmar via Digitalmars-d-learn wrote:If you refer to ??, I'm guessing that's inside libdvbv5.so which might not have been compiled with debug information enabled. -- /Jacob Carlborgmaybe 'cause backtrace is called with `bt` command? ;-)Sadly even using the correct command, I am not getting any data that
Jun 04 2017
On Sunday, 4 June 2017 at 18:13:41 UTC, Russel Winder wrote:On Sun, 2017-06-04 at 20:31 +0300, ketmar via Digitalmars-d-learn wrote:My guess is a null pointer :) check your pointers :)[...]Sadly even using the correct command, I am not getting any data [...]
Jun 04 2017