From: "H . J . Lu" <hjl@lucon.org>
To: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
Cc: GDB <gdb@sourceware.cygnus.com>
Subject: PATCH: Re: [RFHelp] Linux, threads, and regsets in thread_db
Date: Sat, 03 Nov 2001 12:32:00 -0000 [thread overview]
Message-ID: <20011114134521.A25645@lucon.org> (raw)
In-Reply-To: <20011003211007.A12210@nevyn.them.org>; from dmj+@andrew.cmu.edu on Wed, Oct 03, 2001 at 09:10:07PM -0400
On Wed, Oct 03, 2001 at 09:10:07PM -0400, Daniel Jacobowitz wrote:
> > >
> >
> > How far have you gone on Linux/mips? I know gdb 5.1 doesn't work with
> > threads on Linux/mips. Does your change fix it? I'd like to clean up
> > glibc for mips on this.
>
> Yes. Debugging threads works reasonably well. I'm going to do more
> work about this in the next couple of months too, I think; after I go
> back to gdbserver for a little while.
I am still having problems with threads on mips. I cannot set break
point after target has run:
(gdb) run
...
(gdb) b main
reading register sp (#29): No such process.
The problem is gdb tries to read sp register in thread mode. This patch
seems to work for me.
Another problem is when I set a break point in a thread function, only
the first thread stops. I got
(gdb) b process
Breakpoint 1 at 0x400a38: file Examples/ex1.c, line 14.
(gdb) r
Starting program: /export/build/gnu/glibc/build-mipsel-linux/linuxthreads/ex1
[New Thread 1024 (LWP 26552)]
[New Thread 2049 (LWP 26569)]
[New Thread 1026 (LWP 26570)]
[Switching to Thread 1026 (LWP 26570)]
Breakpoint 1, process (arg=0x1000) at Examples/ex1.c:14
14 fprintf (stderr, "Starting process %s\n", (char *) arg);
...
Program received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 1024 (LWP 26552)]
0x2ab8de24 in __syscall_rt_sigsuspend () at soinit.c:56
56 soinit.c: No such file or directory.
But it may be a kernel bug.
H.J.
---
2001-11-14 H.J. Lu (hjl@gnu.org)
* mips-tdep.c (heuristic_proc_desc): Read register only when
target is running.
--- gdb/mips-tdep.c.break Mon Aug 6 17:13:24 2001
+++ gdb/mips-tdep.c Wed Nov 14 13:28:17 2001
@@ -1860,7 +1860,12 @@ static mips_extra_func_info_t
heuristic_proc_desc (CORE_ADDR start_pc, CORE_ADDR limit_pc,
struct frame_info *next_frame)
{
- CORE_ADDR sp = read_next_frame_reg (next_frame, SP_REGNUM);
+ CORE_ADDR sp;
+
+ if (target_has_execution)
+ sp = read_next_frame_reg (next_frame, SP_REGNUM);
+ else
+ sp = 0;
if (start_pc == 0)
return NULL;
next prev parent reply other threads:[~2001-11-14 21:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-24 18:27 Daniel Jacobowitz
2001-09-25 3:09 ` Mark Kettenis
[not found] ` <20011003170848.A30843@lucon.org>
[not found] ` <20011003211007.A12210@nevyn.them.org>
2001-11-03 12:32 ` H . J . Lu [this message]
2001-11-03 14:25 ` PATCH: " Daniel Jacobowitz
2001-11-03 16:54 ` H . J . Lu
2001-11-06 14:28 ` Daniel Jacobowitz
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=20011114134521.A25645@lucon.org \
--to=hjl@lucon.org \
--cc=dmj+@andrew.cmu.edu \
--cc=gdb@sourceware.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