public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* dwarf2 unwinding for i386
@ 2002-06-24  6:39 Michal Ludvig
  2002-06-24  7:54 ` Daniel Jacobowitz
  2002-07-02  3:50 ` Dylan Cuthbert
  0 siblings, 2 replies; 4+ messages in thread
From: Michal Ludvig @ 2002-06-24  6:39 UTC (permalink / raw)
  To: gdb; +Cc: Mark Kettenis

Hi all,
what do you think about adding dwarf2 unwinding (dwarf2cfi.c) to i386 
target? On x86-64 we are already using it for some time now and it seems 
to be quite stable. GCC folks are about to switch omit-frame-pointer on 
by default for i386 in a near future, but are waiting (as I understand 
it) for GDB to implement dwarf2 unwinding, so that the resulting code 
could be debugged. Can we make at least a testing branch with this 
support? Opinions? MarkK?

Michal Ludvig
-- 
* SuSE CR, s.r.o     * mludvig@suse.cz
* +420 2 9654 5373   * http://www.suse.cz

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

* Re: dwarf2 unwinding for i386
  2002-06-24  6:39 dwarf2 unwinding for i386 Michal Ludvig
@ 2002-06-24  7:54 ` Daniel Jacobowitz
  2002-06-24  9:29   ` Andrew Cagney
  2002-07-02  3:50 ` Dylan Cuthbert
  1 sibling, 1 reply; 4+ messages in thread
From: Daniel Jacobowitz @ 2002-06-24  7:54 UTC (permalink / raw)
  To: Michal Ludvig; +Cc: gdb, Mark Kettenis

On Mon, Jun 24, 2002 at 03:39:30PM +0200, Michal Ludvig wrote:
> Hi all,
> what do you think about adding dwarf2 unwinding (dwarf2cfi.c) to i386 
> target? On x86-64 we are already using it for some time now and it seems 
> to be quite stable. GCC folks are about to switch omit-frame-pointer on 
> by default for i386 in a near future, but are waiting (as I understand 
> it) for GDB to implement dwarf2 unwinding, so that the resulting code 
> could be debugged. Can we make at least a testing branch with this 
> support? Opinions? MarkK?

If we do this, IMHO, we should support it for all architectures and not
for just x86-64 and i386.  Everyone wins.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer

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

* Re: dwarf2 unwinding for i386
  2002-06-24  7:54 ` Daniel Jacobowitz
@ 2002-06-24  9:29   ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-06-24  9:29 UTC (permalink / raw)
  To: Daniel Jacobowitz, Michal Ludvig; +Cc: gdb, Mark Kettenis

> On Mon, Jun 24, 2002 at 03:39:30PM +0200, Michal Ludvig wrote:
> 
>> Hi all,
>> what do you think about adding dwarf2 unwinding (dwarf2cfi.c) to i386 
>> target? On x86-64 we are already using it for some time now and it seems 
>> to be quite stable. GCC folks are about to switch omit-frame-pointer on 
>> by default for i386 in a near future, but are waiting (as I understand 
>> it) for GDB to implement dwarf2 unwinding, so that the resulting code 
>> could be debugged. Can we make at least a testing branch with this 
>> support? Opinions? MarkK?
> 
> 
> If we do this, IMHO, we should support it for all architectures and not
> for just x86-64 and i386.  Everyone wins.

The theory is that it should be added here:

/* Using the PC, select a mechanism for unwinding a frame returning
    the previous frame.  The register unwind function should, on
    demand, initialize the ->context object.  */

static void
set_unwind_by_pc (CORE_ADDR pc, CORE_ADDR fp,
                   frame_register_unwind_ftype **unwind)
{
   if (!USE_GENERIC_DUMMY_FRAMES)
     /* Still need to set this to something.  The ``info frame'' code
        calls this function to find out where the saved registers are.
        Hopefully this is robust enough to stop any core dumps and
        return vaguely correct values..  */
     *unwind = frame_saved_regs_register_unwind;
   else if (PC_IN_CALL_DUMMY (pc, fp, fp))
     *unwind = generic_call_dummy_register_unwind;
   else
     *unwind = frame_saved_regs_register_unwind;
}

The i386 doesn't use generic dummy frames and targets need switch to 
generic_unwind_get_saved_register though :-(

Andrew


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

* Re: dwarf2 unwinding for i386
  2002-06-24  6:39 dwarf2 unwinding for i386 Michal Ludvig
  2002-06-24  7:54 ` Daniel Jacobowitz
@ 2002-07-02  3:50 ` Dylan Cuthbert
  1 sibling, 0 replies; 4+ messages in thread
From: Dylan Cuthbert @ 2002-07-02  3:50 UTC (permalink / raw)
  To: gdb

Could this be what's causing our problems on the cygwin platform?

We are compiling with the latest version of g++ (3.1) and trying to debug
with 5.2 of the debugger but get segment faults galore.

Could it be that the cygwin stuff is compiled in 386 mode and causing our
woes?

This is really stumping us as we need a debugger, and currently gcc/gdb
isn't really a good solution at the moment.

Regards

--
---------------------------------
Q-Games, Dylan Cuthbert.
http://www.q-games.com

"Michal Ludvig" <mludvig@suse.cz> wrote in message
news:3D172112.1050108@suse.cz...
> Hi all,
> what do you think about adding dwarf2 unwinding (dwarf2cfi.c) to i386
> target? On x86-64 we are already using it for some time now and it seems
> to be quite stable. GCC folks are about to switch omit-frame-pointer on
> by default for i386 in a near future, but are waiting (as I understand
> it) for GDB to implement dwarf2 unwinding, so that the resulting code
> could be debugged. Can we make at least a testing branch with this
> support? Opinions? MarkK?
>
> Michal Ludvig
> --
> * SuSE CR, s.r.o     * mludvig@suse.cz
> * +420 2 9654 5373   * http://www.suse.cz
>
>



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

end of thread, other threads:[~2002-07-02 10:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-24  6:39 dwarf2 unwinding for i386 Michal Ludvig
2002-06-24  7:54 ` Daniel Jacobowitz
2002-06-24  9:29   ` Andrew Cagney
2002-07-02  3:50 ` Dylan Cuthbert

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).