[semi-OT] gdb backtrace on windows

View: New views
4 Messages — Rating Filter:   Alert me  

[semi-OT] gdb backtrace on windows

by Andrea Zagli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

i'm trying to debug a gtk+ based program on windows inside mingw/msys  
with gdb (7.0)

my problem is that when my program crash i get from the backtrace only  
these two rows

#0  0x77c035e4 in ?? ()
#1  0x00000000 in ?? ()

i used autotools, so my program is compiled with -g (i saw it during  
the compilation stage)

i found here [1] that i must run gdb with the full path of my program;  
but for me it doesn't work

what am I doing wrong?

thanks in advance

[1]  
https://techbase.kde.org/Development/Tutorials/Debugging/Debugging_on_MS_Windows#MinGW_debugging_hints

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: [semi-OT] gdb backtrace on windows

by Tor Lillqvist :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> my problem is that when my program crash i get from the backtrace only these
> two rows
>
> #0  0x77c035e4 in ?? ()
> #1  0x00000000 in ?? ()

> what am I doing wrong?

Nothing, probably, that would cause this unuseful backtrace, you just
have bad luck and the program crashes in an unfortunate context where
gdb is unable to display a meaningful backtrace. Probably because the
code is in some system library that lacks debugging information gdb
would understand, and additionally uses a calling conventions gdb
isn't aware of.

The most likely cause for weird errors is heap corruption. Does your
program run on Linux? Have you tried running it under valgrind to find
heap corruption errors? (See http://live.gnome.org/Valgrind for
instructions, in particular the use of G_SLICE=always-malloc is
important.)

--tml
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: [semi-OT] gdb backtrace on windows

by Dan Kegel-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Mon, Oct 19, 2009 at 12:52 PM, Tor Lillqvist <tml@...> wrote:
> The most likely cause for weird errors is heap corruption. Does your
> program run on Linux? Have you tried running it under valgrind to find
> heap corruption errors? (See http://live.gnome.org/Valgrind for
> instructions, in particular the use of G_SLICE=always-malloc is
> important.)

Yeah, if you can repeat it on Linux, you may have an easier
time of debugging it.

For what it's worth, I've gotten Valgrind to work and give good stack traces
with Wine (for apps compiled with visual C).  It might be worth trying
in a pinch if you can't reproduce on Linux.
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Re: [semi-OT] gdb backtrace on windows

by Andrea Zagli-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Il giorno lun 19 ott 2009 21:52:38 CEST, Tor Lillqvist ha scritto:

>> my problem is that when my program crash i get from the backtrace only these
>> two rows
>>
>> #0  0x77c035e4 in ?? ()
>> #1  0x00000000 in ?? ()
>
>> what am I doing wrong?
>
> Nothing, probably, that would cause this unuseful backtrace, you just
> have bad luck and the program crashes in an unfortunate context where
> gdb is unable to display a meaningful backtrace. Probably because the
> code is in some system library that lacks debugging information gdb
> would understand, and additionally uses a calling conventions gdb
> isn't aware of.

:-(

> The most likely cause for weird errors is heap corruption. Does your
> program run on Linux?

yes it doesn't crash

> Have you tried running it under valgrind to find
> heap corruption errors? (See http://live.gnome.org/Valgrind for
> instructions, in particular the use of G_SLICE=always-malloc is
> important.)

i tried but i don't know how to interpret the result


instead, i think to have found the problem but i don't know why on  
linux it works and on windows not; i think it is a problem on libgda  
or on the use that i did it

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@...
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list