Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Roland Schwingel <roland.schwingel@onevision.de>
To: Joel Brobecker <brobecker@adacore.com>, gdb <gdb@sourceware.org>
Subject: Re: Strange stack trace on Windows
Date: Tue, 17 Mar 2009 15:39:00 -0000	[thread overview]
Message-ID: <49BFC403.3070306@onevision.de> (raw)

Hi...

Joel Brobecker wrote on 17.03.2009 16:08:35:
 > > Wouldn't it be possible to also adjust gdb's stepping code to work with
 > > your patch? Or (also not really nice, but maybe cleaner) to
 > > only use your patch for stack dumping. For stepping rely on the
 > > "other" (means current) frame code.
 >
 > Unfortunately, not. Everything is related: In order to determine whether
 > we stepped into a function during the "next", we do the equivalent of
 > a 2-frame backtrace.
 >
 > However, thinking about this a little more, perhaps there is a way out
 > for the "next" case: Try checking the PC against the start address
 > of the function. If the PC is at the start address of your function,
 > then the function prologue hasn't had time to adjust the stack in such
 > a way that we can't unwind from it, and thus the normal processing
 > should work.
That sounds interesting... :-)
Could you outline that a bit more? Where and how can I do that?
(I am digging in gdb's source only for a few days now).

 > > It is quite painful to use gdb on windows for quite a while now.
 > > Windows, whether one may like it or not, is a major platform
 > > and gdb should also operate well here. I am fighting for a long time
 > > with these problems now.
 >
 > As I hinted earlier, I think that this has to do with the fact that
 > you debug code that makes calls to functions that live inside DLLs.
 > This is a relatively specific condition...
Really so specific? I don't think so. Having dlls is quite common
on windows. The operating system itself is mostly a bunch of dlls. And if
one wants to use these functions he has to call them. As in my
example setbuf() from msvcrt.dll.
 
 > > Isn't there a general solution thinkable?  GDB is cool piece of
 > > software. For me it is "THE" debugger but this problem transforms more
 > > and more into killer problem here.
 >
 > Pedro answered exactly what I would have answered: The real proper
 > way to fix the problem is to teach GDB how to read the Windows "debug"
 > info. So far, no one has had enough interest in this project to see
 > it through.
Hmm.. Are so few people using gdb on windows? I think there should be
way more interest in getting gdb to deal right with MS debugging
format in order to get also debugging with frameless functions right.

Roland


             reply	other threads:[~2009-03-17 15:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-17 15:39 Roland Schwingel [this message]
2009-03-17 19:43 ` Joel Brobecker
  -- strict thread matches above, loose matches on Subject: below --
2009-03-23 13:12 Roland Schwingel
2009-03-18  9:26 Roland Schwingel
2009-03-19 14:18 ` Joel Brobecker
2009-03-17 15:26 Roland Schwingel
2009-03-17 13:49 Roland Schwingel
2009-03-17 14:27 ` Pedro Alves
2009-03-17 15:08 ` Joel Brobecker
2009-03-17 11:58 Roland Schwingel
2009-03-17 13:19 ` Joel Brobecker
2007-09-29 22:01 Gordon Prieur
2007-09-30  3:00 ` Daniel Jacobowitz
2007-09-30 18:13 ` Eli Zaretskii
2007-10-01 14:03   ` Gordon Prieur
2007-10-01 14:39     ` Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49BFC403.3070306@onevision.de \
    --to=roland.schwingel@onevision.de \
    --cc=brobecker@adacore.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox