>Number: 5533
>Category: bin
>Synopsis: gdb -w is broken.
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jun 3 04:35:00 1998
>Last-Modified:
>Originator: matthew green
>Organization:
people's front against (bozotic) www (softwar foundation)
>Release: 1.3E
>Environment:
System: NetBSD splode.eterna.com.au 1.3E NetBSD 1.3E (_splode_) #373: Sun Apr 26 14:18:04 EST 1998 mrg@splode.eterna.com.au:/orb/v/src/sys/arch/sparc/compile/_splode_ sparc
>Description:
gdb -w is not able to change values of variables in a kernel.
i used to use `gdb -k -w /netbsd' to do this, but there is no
`-k' to gdb anymore, and you can't do `target kcore' with no
core file :(
eg:
goa /# gdb -w /netbsd
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (sparc-netbsd), Copyright 1996 Free Software Foundation, Inc...(no debugging symbols found)...
(gdb) set securelevel=-1
Cannot access memory at address 0xf0110328.
(gdb) quit
goa /# gdb.old -k -w /netbsd
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.11 (sparc-netbsd), Copyright 1993 Free Software Foundation, Inc...
Attempt to extract a component of a value that is not a structure pointer.
(no debugging symbols found)...
(kgdb) set securelevel=-1
(kgdb) quit
goa /#
the old gdb has some problems but it *does* work, and rebooting does let
me write disklabels on mounted filesystems..
>How-To-Repeat:
realise your securelevel is set to 0 in the kernel, not -1, and
try to change it easily like you used to. note that gdb(1) is
now broken and can't do this anymore. scream and realise that you
anticipated this and kept the old gdb around just in case.
>Fix:
fix gdb (again).
>Audit-Trail:
>Unformatted: