Re: 2.1.64: debugging is broken

Hans Lermen (lermen@elserv.ffm.fgan.de)
Sat, 15 Nov 1997 17:22:54 +0100 (MET)


On Sat, 15 Nov 1997, Steffen Zahn wrote:

> it seems that debugging programs with gdb does no longer work.
>
> Linux 2.1.64 UP, gcc 2.7.2.1, gdb 4.14.
> ...
> sz@zahn:~/c $ gdb ./a.out
> ...
> (gdb) run
> Starting program: /export/home/sz/c/./a.out
> warning: stopped at unknown breakpoint while handling shared libraries

Yup, sideeffect of the f00f workaround. As Linus stated, this workaround
needs 'fine tuning' now:-)

For the record: With the f00f workaround, after INT3, eip now points
_to_ the instruction instead of _behind_ it as it should.
Please try the below patch, which should fix the INT3. Though its a patch
for pre-2.0.32-4, it should fit into 2.1.64 as well.

Hans
<lermen@fgan.de>

--- ../linux-pre-2.0.32-4-clean/arch/i386/mm/fault.c Fri Nov 14 20:48:13 1997
+++ arch/i386/mm/fault.c Sat Nov 15 16:58:15 1997
@@ -145,6 +145,7 @@
do_overflow, /* 4 - overflow */
do_bounds, /* 5 - bound range */
do_invalid_op }; /* 6 - invalid opcode */
+ if (nr == 3) regs->eip++;
handler[nr](regs, error_code);
return;
}