From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23572 invoked by alias); 21 Oct 2004 17:22:14 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 23563 invoked from network); 21 Oct 2004 17:22:10 -0000 Received: from unknown (HELO walton.sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 21 Oct 2004 17:22:10 -0000 Received: from elgar.sibelius.xs4all.nl (elgar.sibelius.xs4all.nl [192.168.0.2]) by walton.sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id i9LHM4xj001993; Thu, 21 Oct 2004 19:22:04 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (localhost [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6) with ESMTP id i9LHM4Aj000844; Thu, 21 Oct 2004 19:22:04 +0200 (CEST) (envelope-from kettenis@elgar.sibelius.xs4all.nl) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.12.6p3/8.12.6/Submit) id i9LHM4in000841; Thu, 21 Oct 2004 19:22:04 +0200 (CEST) Date: Fri, 22 Oct 2004 12:28:00 -0000 Message-Id: <200410211722.i9LHM4in000841@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: amitkale@linsyssoft.com CC: gdb@sources.redhat.com In-reply-to: <200410211821.08680.amitkale@linsyssoft.com> Subject: Re: kgdb support for gdb: patch 1 References: <200410211821.08680.amitkale@linsyssoft.com> X-SW-Source: 2004-10/txt/msg00397.txt.bz2 From: "Amit S. Kale" Date: Thu, 21 Oct 2004 18:21:08 +0530 Hi, I haven't added any support for detecting kernel osabi automatically. Detecting it with present kernel binary structure is rather shaky. It's safer to let users run the command "set osabi Linux-kernel". Fair enough. Indeed it seems that vmlinux is a fairly standard static ELF executable. I'll be later sending more patches. Please review it and let me know if it's ok for inclusion in gdb. Of course it isn't, since this can't compile ;-). You seem to be in limbo betwen LINUXKERNEL and LINUX_KERNEL. Please choose the variant *with* the underscore. Anyway, I think for the kernel you shouldn't use the Linux register cache layout, bur rather the normal register layout. The Linux register cache includes the "orig_eax" pseudo register that is implemented by the kernel. My guess is that the kernel itself doesn't have it. I'm not completely sure though, but unless you can motivate why you do need "orig_eax" please remove these lines: + set_gdbarch_num_regs (gdbarch, I386_LINUX_NUM_REGS); + set_gdbarch_register_name (gdbarch, i386_linux_register_name); + set_gdbarch_register_reggroup_p (gdbarch, i386_linux_register_reggroup_p); These lines will need adjustments too: + tdep->gregset_reg_offset = i386_linux_gregset_reg_offset; + tdep->gregset_num_regs = ARRAY_SIZE (i386_linux_gregset_reg_offset); + tdep->sizeof_gregset = 17 * 4; Setting tdep->gregset_num_regs to I386_NUM_GREGS should be OK. Apart from that, you'll also need to provide a ChangeLog. Can you post an update patch? Cheers, Mark