From: Daniel Jacobowitz <drow@false.org>
To: "Amit S. Kale" <amitkale@linsyssoft.com>
Cc: GDB patches <gdb-patches@sources.redhat.com>
Subject: Re: [patch] gdbserver fails on 32-bit ppc rfs running in a-64 bit 2.6 linux kernel
Date: Mon, 14 Mar 2005 16:23:00 -0000 [thread overview]
Message-ID: <20050314162252.GA23939@nevyn.them.org> (raw)
In-Reply-To: <200503142137.35799.amitkale@linsyssoft.com>
On Mon, Mar 14, 2005 at 09:37:35PM +0530, Amit S. Kale wrote:
> Hi,
>
> I found that gdbserver fails on a 32-bit ppc rfs running in a 64-bit 2.6 linux
"rfs"? It'd be nice to explain one's acronyms...
> kernel. The thread id's fetched from thread-db library are above 0x7fffffff.
> gdbserver has implicit assumptions that thread id's are "signed integers".
> This is true when running under a 32-bit kernel, but not true here. Attached
> patch fixes this problem by changing the "strtol" that scans the thread-id to
> "strtoul" and by changing the "cont_thread > 0" comparison to "cont_thread !=
> -1".
>
> Is there any likelyhood of this assumption being made in some other places in
> gdbserver or gdb?
Please see:
2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
* inferiors.c (change_inferior_id, add_thread, find_inferior_id):
Take unsigned long arguments for PIDs.
* linux-low.c (add_process, linux_attach_lwp, linux_attach)
(linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
(wait_for_sigstop, linux_resume_one_process)
(regsets_fetch_inferior_registers, linux_send_signal)
(linux_read_auxv): Likewise. Update the types of variables holding
PIDs. Update format string specifiers.
* linux-low.h (struct process_info, linux_attach_lwp): Likewise.
* remote-utils.c (prepare_resume_reply): Likewise.
* server.c (cont_thread, general_thread, step_thread)
(thread_from_wait, old_thread_from_wait, signal_pid): Change type to
unsigned long.
(handle_query): Update format specifiers.
(handle_v_cont, main): Use strtoul for thread IDs.
* server.h (struct inferior_list_entry): Use unsigned long for ID.
(add_thread, find_inferior_id, change_inferior_id, cont_thread)
(general_thread, step_thread, thread_from_wait)
(old_thread_from_wait): Update.
* target.h (struct thread_resume): Use unsigned long for THREAD.
(struct target_ops): Use unsigned long for arguments to attach and
thread_alive.
Your sources are dated after this but don't seem to include this fix.
--
Daniel Jacobowitz
CodeSourcery, LLC
next prev parent reply other threads:[~2005-03-14 16:23 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-14 16:07 Amit S. Kale
2005-03-14 16:23 ` Daniel Jacobowitz [this message]
2005-03-14 16:57 ` Christopher Faylor
2005-03-14 17:02 ` Daniel Jacobowitz
2005-03-15 13:07 ` Amit S. Kale
2005-03-16 3:16 ` Daniel Jacobowitz
2005-06-17 4:00 ` Daniel Jacobowitz
2005-03-16 16:54 Jitendra Pawar
2005-03-16 16:57 ` Daniel Jacobowitz
2005-03-22 14:11 ` Jitendra Pawar
2005-03-22 14:23 ` Daniel Jacobowitz
2005-03-22 14:50 ` Jitendra Pawar
2005-03-22 14:54 ` Daniel Jacobowitz
2005-03-23 10:03 ` Jitendra Pawar
2005-03-23 15:43 ` Daniel Jacobowitz
2005-03-24 13:42 ` Jitendra Pawar
2005-03-24 14:02 ` Daniel Jacobowitz
2005-03-22 18:49 ` Mark Kettenis
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=20050314162252.GA23939@nevyn.them.org \
--to=drow@false.org \
--cc=amitkale@linsyssoft.com \
--cc=gdb-patches@sources.redhat.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