* [RFC] link GDB against libunwind-ia64
@ 2005-08-11 23:54 Joel Brobecker
2005-08-12 1:28 ` Kevin Buettner
2005-08-12 9:41 ` Mark Kettenis
0 siblings, 2 replies; 6+ messages in thread
From: Joel Brobecker @ 2005-08-11 23:54 UTC (permalink / raw)
To: gdb-patches
Hello,
I'm currently working on a GDB port for ia64-hpux, and I'm having some
problems with the unwinding of a stacked register. I'm trying to find
the source of the problem, and part of the investigation lead me to look
into the libunwind-ia64 code.
I noticed that GDB uses the libunwind-ia64 shared library without being
directly linked to it. Instead, it uses dlopen().
This method has its advantages, but also introduces an extra layer
of complication that is preventing me from making progress (*): A bug
in my debugger is causing problems when I am attempting operations such
as next or step over code inside that library.
So I'd like to add an option so that GDB is explicitly linked against
libunwind-ia64, instead of using dlopen(). As a bonus, this may simplify
our work in terms of binary distribution...
I was wondering if this would be an interesting enhancement to contribute.
Let me know...
--
Joel
(*): There is also the fact that it's tough to tell when you run GDB
whether the libunwind unwinder has been initialized or not, since
it depends on the success of the dlopen() and a few other operations.
And when succesful, it's also tough to determine which one was used.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [RFC] link GDB against libunwind-ia64
2005-08-11 23:54 [RFC] link GDB against libunwind-ia64 Joel Brobecker
@ 2005-08-12 1:28 ` Kevin Buettner
2005-08-12 9:41 ` Mark Kettenis
1 sibling, 0 replies; 6+ messages in thread
From: Kevin Buettner @ 2005-08-12 1:28 UTC (permalink / raw)
To: Joel Brobecker; +Cc: gdb-patches
On Thu, 11 Aug 2005 15:23:23 -0700
Joel Brobecker <brobecker@adacore.com> wrote:
> I'm currently working on a GDB port for ia64-hpux, and I'm having some
> problems with the unwinding of a stacked register. I'm trying to find
> the source of the problem, and part of the investigation lead me to look
> into the libunwind-ia64 code.
>
> I noticed that GDB uses the libunwind-ia64 shared library without being
> directly linked to it. Instead, it uses dlopen().
>
> This method has its advantages, but also introduces an extra layer
> of complication that is preventing me from making progress (*): A bug
> in my debugger is causing problems when I am attempting operations such
> as next or step over code inside that library.
>
> So I'd like to add an option so that GDB is explicitly linked against
> libunwind-ia64, instead of using dlopen(). As a bonus, this may simplify
> our work in terms of binary distribution...
>
> I was wondering if this would be an interesting enhancement to contribute.
I'm wondering if there's a good reason to preserve the existing
dlopen() mechanism. In other words, why not always link directly
against libunwind-ia64?
Kevin
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] link GDB against libunwind-ia64
2005-08-11 23:54 [RFC] link GDB against libunwind-ia64 Joel Brobecker
2005-08-12 1:28 ` Kevin Buettner
@ 2005-08-12 9:41 ` Mark Kettenis
2005-08-12 17:13 ` Marcel Moolenaar
2005-08-15 19:04 ` Joel Brobecker
1 sibling, 2 replies; 6+ messages in thread
From: Mark Kettenis @ 2005-08-12 9:41 UTC (permalink / raw)
To: brobecker; +Cc: gdb-patches
> Date: Thu, 11 Aug 2005 15:23:23 -0700
> From: Joel Brobecker <brobecker@adacore.com>
>
> Hello,
>
> So I'd like to add an option so that GDB is explicitly linked against
> libunwind-ia64, instead of using dlopen(). As a bonus, this may simplify
> our work in terms of binary distribution...
If libunwind-ia64 is always available on ia64-*-hpux*, we really
should simply link against it.
Mark
P.S. Does the inf-ttrace.c code work for ia64-*-hpux*?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] link GDB against libunwind-ia64
2005-08-12 9:41 ` Mark Kettenis
@ 2005-08-12 17:13 ` Marcel Moolenaar
2005-08-12 20:31 ` Joel Brobecker
2005-08-15 19:04 ` Joel Brobecker
1 sibling, 1 reply; 6+ messages in thread
From: Marcel Moolenaar @ 2005-08-12 17:13 UTC (permalink / raw)
To: Mark Kettenis; +Cc: brobecker, gdb-patches
On Aug 12, 2005, at 1:05 AM, Mark Kettenis wrote:
>> Date: Thu, 11 Aug 2005 15:23:23 -0700
>> From: Joel Brobecker <brobecker@adacore.com>
>>
>> Hello,
>>
>> So I'd like to add an option so that GDB is explicitly linked against
>> libunwind-ia64, instead of using dlopen(). As a bonus, this may
>> simplify
>> our work in terms of binary distribution...
>>
>
> If libunwind-ia64 is always available on ia64-*-hpux*, we really
> should simply link against it.
There's a libunwind on HP-UX that's part of the system, but it doesn't
have a libunwind-ia64 component. The libunwind-ia64 shared object is an
implementation detail of David Mosberger's library. Since we're talking
about libunwind-ia64, I can only assume that we're talking about David's
library. That library is not always available in the general case.
Still, I think it's good to be able to link against libunwind. It really
should be present on any ia64 system, irrespective of the OS.
--
Marcel Moolenaar marcel@cup.hp.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] link GDB against libunwind-ia64
2005-08-12 17:13 ` Marcel Moolenaar
@ 2005-08-12 20:31 ` Joel Brobecker
0 siblings, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2005-08-12 20:31 UTC (permalink / raw)
To: Marcel Moolenaar; +Cc: Mark Kettenis, gdb-patches
> There's a libunwind on HP-UX that's part of the system, but it doesn't
> have a libunwind-ia64 component. The libunwind-ia64 shared object is an
> implementation detail of David Mosberger's library. Since we're talking
> about libunwind-ia64, I can only assume that we're talking about David's
> library. That library is not always available in the general case.
That's all correct. I built that library from sources, fixed a few
nixes, and installed it in a non-standard location.
> Still, I think it's good to be able to link against libunwind. It
> really should be present on any ia64 system, irrespective of the OS.
I agree. This is a very nice library.
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC] link GDB against libunwind-ia64
2005-08-12 9:41 ` Mark Kettenis
2005-08-12 17:13 ` Marcel Moolenaar
@ 2005-08-15 19:04 ` Joel Brobecker
1 sibling, 0 replies; 6+ messages in thread
From: Joel Brobecker @ 2005-08-15 19:04 UTC (permalink / raw)
To: Mark Kettenis; +Cc: gdb-patches
Forgot to answer this question:
> P.S. Does the inf-ttrace.c code work for ia64-*-hpux*?
I wouldn't be able to swear it, because I'm working with GDB 6.3, but
I think so (with a few modifications - the startup process is slightly
different on ia64).
--
Joel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-15 18:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-11 23:54 [RFC] link GDB against libunwind-ia64 Joel Brobecker
2005-08-12 1:28 ` Kevin Buettner
2005-08-12 9:41 ` Mark Kettenis
2005-08-12 17:13 ` Marcel Moolenaar
2005-08-12 20:31 ` Joel Brobecker
2005-08-15 19:04 ` Joel Brobecker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox