Subject: gdb is still broken
To: Andy Heffernan <ahh@netcom.com>
From: Arthur Hoffmann <hoffmann@it.ntu.edu.au>
List: amiga-dev
Date: 09/03/1994 15:45:36
>
> > root@atze(6)$ gdb hoffmann1
> > (gdb) break main
> > Breakpoint 1 at 0x28a0: file hoffmann1.c, line 36.
> > (gdb) run
> > Starting program: /home/hoffmann/vogle/ass1/hoffmann-ass1/hoffmann1
> > reading register pc (#17): Invalid argument.
>
> This is due to some bogus checks in ptrace():
>
> *** sys_process.c-orig Mon Aug 15 10:25:35 1994
> --- sys_process.c Tue Aug 23 17:36:22 1994
> ***************
> *** 211,217 ****
> --- 211,221 ----
> * that the address be int-aligned.
> */
> if ((u_long)uap->addr > (ctob(UPAGES) - sizeof(int)) ||
> + #ifdef STUPID_RESTRICTION
> ((u_long)uap->addr & (sizeof(int) - 1)) != 0)
> + #else
> + 0)
> + #endif
> return (EINVAL);
>
> /*
> ***************
> *** 232,238 ****
> --- 236,246 ----
> * it won't be used for anything anyway.
> */
> if ((u_long)uap->addr > (ctob(UPAGES) - sizeof(int)) ||
> + #ifdef STUPID_RESTRICTION
> ((u_long)uap->addr & (sizeof(int) - 1)) != 0)
> + #else
> + 0)
> + #endif
> return (EINVAL);
>
> /* And write the data. */
>
>
Thanks for your quick reply and patch.
I installed the patch , but now when using gdb it simply hangs my
machine.
First time it went like this:
root@atze(2)$ gdb hoffmann1
(gdb) break main
(gdb) run
(gdb) s
(gdb) error accessing memory address 0x288e: No such process
(gdb) s
At this point the whole machine hangs l-alt l-Amiga F10 doesn't work
either.
Running gdb with emacs didn't produce the memory error but hangs the
machine as well.
Arthur.
__
Arthur Hoffmann 58/1 Dickward Drive
Fannie Bay N.T. 0820
Darwin - Australia.
hoffmann@it.ntu.edu.au Tel.:(0061/)89/818926
------------------------------------------------------------------------------