Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Sep 2004 23:43:22 -0700
From:      Jerry Toung <jtoung@arc.nasa.gov>
To:        "Greg 'groggy' Lehey" <grog@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: add-symbol-file
Message-ID:  <200409182343.22827.jtoung@arc.nasa.gov>
In-Reply-To: <20040918044315.GE67689@wantadilla.lemis.com>
References:  <200409171702.58905.jtoung@arc.nasa.gov> <20040918044315.GE67689@wantadilla.lemis.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Greg,
I am not using remote debugging, that's why I made a call to kldsyms (loc=
al=20
system) but it only loaded acpi.ko.
 May be I should try over a serial console. The system wasn't crashed or =
in db=20
prompt though.
As for the question regarding where I got the addresses from,
I typed:
asf -k -f -s -x modulepath .asf, this created the ".asf" file and its con=
tain=20
was "add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.ko
 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0"
 then I copied and past it to the kgdb prompt, all went ok. but when I wa=
nt to=20
list *0xc24b3184, it complained about "No source code available" or somet=
hing=20
like that. That's where I am puzzled.
I will do what you suggested and over serial console and repost if any=20
problems.
Thank you,
Jerry




>
> It looks like you're not doing it the way it was intended.  As it
>
> says:
> > Type 'getsyms' after connection to load kld symbols.
>
> This does the add-symbol-file for you.  Take a look at gdb(4) for more
> details.
>
> > If you're debugging a local system, you can use 'kldsyms' instead
> > to load the kld symbols.  That's a less obnoxious interface.
> > doadump () at pcpu.h:159
> > (kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.=
ko
> > 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0
>
> I'm assuming that this was broken by your MUA, and it's not the way
>
> you put it in, which must have been:
> > (kgdb) add-symbol-file /usr/local/src/nren-6.0current/osr_src/if_osr.=
ko
> > 0xc24b3184 -s .data 0xc24b6900 -s .bss 0xc24b6cc0
>
> Where did you get these addresses from?  They're all outside the
> bounds of the kld as shown below.
>
> >
>
> In any case, I'm not sure that you need getsyms any more.  It used to
> be needed to get round various gdb restrictions.  What happens if you
> don't do anything?  If that doesn't work, how about running getsyms,
> as suggested?  Please let me know either way what happens.
>
> Greg



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409182343.22827.jtoung>