From: Joel Brobecker <brobecker@act-europe.fr>
To: Kevin Buettner <kevinb@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix compilation failure in hpux-thread.c under HPUX 11.00
Date: Fri, 28 Sep 2001 14:31:00 -0000 [thread overview]
Message-ID: <20010928233120.A24896@act-europe.fr> (raw)
In-Reply-To: <1010927170437.ZM4452@ocotillo.lan>
> Thanks for looking into this. Looking at your patch, my first
> impulse was to declare your changes as obvious and tell you to
> commit it.
>
> But now that I've taken a closer look at find_active_thread(), I
> see the following:
>
> static int
> find_active_thread (void)
> {
> ...
>
> return (cma_thread_get_unique (&tcb.prolog.client_thread) << 16)
> | PIDGET (main_ptid);
> }
>
> It appears to me that this code is still utilizing the old technique
> of overloading a thread and a pid into the same 32-bit identifier.
>
> So, find_active_thread() should probably be rewritten as follows:
>
> static ptid_t
> find_active_thread (void)
> {
> ...
>
> return (ptid_build (PIDGET (main_ptid), 0,
> cma_thread_get_unique (&tcb.prolog.client_thread)));
> }
>
> My guess is that making the above change will allow hpux-thread.c to
> compile, but that it won't really work right (or even at all) until
> find_tcb() is rewritten. I think that find_tcb should take a ptid_t
> instead of an int as its thread argument. It needs to fetch the thread
> by invoking ptid_get_tid() instead of right shifting by 16.
>
> Once this is done, hpux_pid_to_str() also needs to be revised to
> call ptid_get_tid() instead of shifting the pid result right by 16.
Kevin,
thanks for your feedback. I have tried to implement your suggestions,
but it is a bit hard for me, because I don't have the knowledge on how
the data structures are organised. I tried to guess as best as I could
and came up with the following patch. I made the changes in emergency
mode because I'm off on a trip the entire next week. You'll have to
excuse me if I don't respond to your comments.
As a side note, I tried to run the GDB I obtained and did not have
much luck. Setting breakpoints seems ok, although I haven't double
checked the pc addresses. However, when I try to run, GDB prints
"Starting program ..." and then just sits there. The inferior is never
spawned but I get 2 gdb processes for the price of one. I haven't had
time to investigate more, and I'm not sure if this is because of my
changes or not.
Anyway, I'm attaching the patch, awaiting your comments. There is one
static variable that was probably intended to be used as a cache. It was
never assigned a value, so I deleted it for now. I could submit this
obvious change as a separate patch if necessary.
2001-09-28 J. Brobecker <brobecker@gnat.com>
* hpux-thread.c: rewrite find_active_thread() and find_tcb()
to use ptid_t, instead of overloading the thread and the pid
into the same 32-bit value. Make associated necessary adaptations.
Also remove unused variable cached_active_thread.
Thanks,
--
Joel
From brobecker@act-europe.fr Fri Sep 28 14:38:00 2001
From: Joel Brobecker <brobecker@act-europe.fr>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Fix compilation failure in bfd/som.c under HPUX 11.00
Date: Fri, 28 Sep 2001 14:38:00 -0000
Message-id: <20010928233841.B24896@act-europe.fr>
References: <20010927160703.G21075@act-europe.fr> <3BB370B3.3020904@cygnus.com>
X-SW-Source: 2001-09/msg00440.html
Content-length: 284
> > 2001-09-27 J. Brobecker <brobecker@gnat.com> * som.c (som_write_symbol_strings): Fix incorrect type of
> > current_offset to match the function definition. Fixes a build
> > failure on HPUX-11.00
> >
> >
>
> Fine with me.
Thanks, commited.
--
Joel
next prev parent reply other threads:[~2001-09-28 14:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-27 6:53 Joel Brobecker
2001-09-27 10:05 ` Kevin Buettner
2001-09-28 14:31 ` Joel Brobecker [this message]
2001-10-01 11:40 ` Kevin Buettner
2001-10-01 12:12 ` Andrew Cagney
2001-10-08 13:50 ` 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=20010928233120.A24896@act-europe.fr \
--to=brobecker@act-europe.fr \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@cygnus.com \
/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