From: "Amit S. Kale" <amitkale@linsyssoft.com>
To: Mark Kettenis <kettenis@gnu.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: kgdb support for gdb
Date: Tue, 19 Oct 2004 12:45:00 -0000 [thread overview]
Message-ID: <200410191813.38468.amitkale@linsyssoft.com> (raw)
In-Reply-To: <200410020921.45566.amitkale@linsyssoft.com>
On Saturday 02 Oct 2004 9:21 am, Amit S. Kale wrote:
> On Saturday 02 Oct 2004 3:30 am, Mark Kettenis wrote:
> > From: "Amit S. Kale" <amitkale@linsyssoft.com>
> > Date: Fri, 1 Oct 2004 13:14:33 +0530
> >
> > Hi,
> >
> > Attached patches add kgdb support to gdb. They define two new
> > targets i386-lk and x86_64-lk. Because of the definition of these
> > targets, one can build a gdb with does not contain the linux
> > operating environment specific things which are inappropriate for
> > the kernel, like signal trampoline frame parsing.
> >
> > I don't think you/we should add a new target triple for this stuff.
> > Instead you should add a special OS ABI variant for the kernel, and
> > use that to define your own kernel architecture vector. I suppose
> > there is a way to detect that a binary is a Linux kernel instead of a
> > normal ELF executable?
>
> Yes. There is a way to detect that. I'll look into this and get back with a
> different patch.
There isn't an easy way to detect that we have a kernel binary. Kernel binary
vmlinux is an i386 linux elf executable. For now I have defined an osabi
"Linux-kernel". Since there is no way to automatically detect that users have
to tell gdb to use it explicitly.
I'll send out a patch when I am done with the rest of the things suggested by
you and Andrew C.
Please let me know whether following user interface is ok.
Thanks
-Amit
[amitkale@pythagoras gdb-build]$ gdb/gdb ~/build/2.6.9-rc2-i386/vmlinux
GNU gdb 6.2.50_2004-10-15-cvs
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or 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.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) set osabi Linux-kernel
(gdb) tar re /dev/ttyS0
Remote debugging using /dev/ttyS0
breakpoint () at /home/amitkale/work/linux-2.6.9-rc2/kernel/kgdb.c:1285
1285 atomic_set(&kgdb_setting_breakpoint, 0);
warning: no shared library support for this OS / ABI
(gdb) bt
#0 breakpoint () at /home/amitkale/work/linux-2.6.9-rc2/kernel/kgdb.c:1285
next prev parent reply other threads:[~2004-10-19 12:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-01 7:45 Amit S. Kale
2004-10-01 9:13 ` Andreas Schwab
2004-10-01 9:57 ` Amit S. Kale
2004-10-01 22:01 ` Mark Kettenis
2004-10-02 3:52 ` Amit S. Kale
2004-10-02 22:48 ` Mark Kettenis
2004-10-04 14:56 ` Andrew Cagney
2004-10-19 12:45 ` Amit S. Kale [this message]
2004-10-04 15:14 ` Andrew Cagney
2004-10-04 15:42 ` Amit S. Kale
2004-10-19 12:55 ` Amit S. Kale
2004-10-04 15:55 ` Andrew Cagney
2004-10-04 16:36 ` Amit S. Kale
2004-10-04 17:23 ` Daniel Jacobowitz
2004-10-25 5:50 ` Amit S. Kale
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200410191813.38468.amitkale@linsyssoft.com \
--to=amitkale@linsyssoft.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox