Subject: Re: gdb
To: None <felix@students.poly.edu>
From: John Gordon <mailing.lists@dial.pipex.com>
List: current-users
Date: 06/14/2003 02:14:35
Hello,

> And I must apologise for not testing it on my x86 box here - I have
> actually built the binaries to try it out and will attempt to do so
> sometime in the next few days (been kind of busy since I just started a
> new job).

OK, finally, after a few hiccoughs I have managed to get my old pentium 
system running with -current (from a few days ago at least).

When I run Felix's test case under GDB with my patch applied I do see 
some problems still:

(gdb) b 20
Breakpoint 1 at 0x8048a96: file thread_test.c, line 20.
(gdb) b 9
Breakpoint 2 at 0x8048a4e: file thread_test.c, line 9.
(gdb) run
Starting program: /usr/home/johng/thread_test

Breakpoint 1, main () at thread_test.c:20
20              pthread_create (&thread, NULL, thread_execution, NULL);
(gdb) info threads
* 1 Thread 0 ()  main () at thread_test.c:20
(gdb) c
Continuing.
[Switching to Thread 21 ()]

Breakpoint 2, 0xbfbfeba0 in ?? ()
(gdb) info threads
* 2 Thread 21 ()  0xbfbfeba0 in ?? ()
   1 Thread 0 ()  0x4805fff2 in pthread__locked_switch ()
    from /usr/lib/libpthread.so.0

Notice that the thread list is correct, but the thread's registers (or 
at least its PC value) seem to be totally corrupted. As you can imagine, 
stepping/continuing that thread results in an exception and the program 
exits.

When run without the debugger it works fine. Once any threading has 
started though, the debugger seems to be getting the wrong values on 
i386. On PPC it works perfectly.

Don't know how much time I'll have this weekend to look at it, but I'll 
try to spend some time with it and see if I can determine what is going 
wrong.

TTFN,
John...

-- 
John Gordon
- VxWorks, NetBSD, PalmOS & more             http://www.bluedonkey.org