From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7133 invoked by alias); 30 Jul 2002 12:30:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 7126 invoked from network); 30 Jul 2002 12:30:26 -0000 Received: from unknown (HELO exchange.colubris.com) (206.162.167.230) by sources.redhat.com with SMTP; 30 Jul 2002 12:30:26 -0000 Received: from colubris.com ([192.168.30.124]) by exchange.colubris.com with Microsoft SMTPSVC(5.0.2195.3779); Tue, 30 Jul 2002 08:26:59 -0400 Message-ID: <3D468687.5090400@colubris.com> Date: Tue, 30 Jul 2002 05:53:00 -0000 From: Martin Gadbois Organization: Colubris Networks Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner CC: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Cross target core debugging: host=i386, Target=PPC References: <3D45ACCC.9040803@colubris.com> <1020729215359.ZM11339@localhost.localdomain> X-Enigmail-Version: 0.49.5.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 30 Jul 2002 12:26:59.0906 (UTC) FILETIME=[66E2EA20:01C237C4] X-SW-Source: 2002-07/txt/msg00579.txt.bz2 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Kevin Buettner wrote: | On Jul 29, 4:59pm, Martin Gadbois wrote: | | |>diff -Naur gdb-5.2/gdb/gregset.h gdb-5.2-ppc-core/gdb/gregset.h |>--- gdb-5.2/gdb/gregset.h Sun Feb 24 17:14:33 2002 |>+++ gdb-5.2-ppc-core/gdb/gregset.h Mon Jul 29 15:45:43 2002 |>@@ -21,6 +21,20 @@ |> #ifndef GREGSET_H |> #define GREGSET_H |> |>+ |>+#define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ |>+#define ELF_NFPREG 33 /* includes fpscr */ |>+#define ELF_NVRREG 33 /* includes vscr */ |>+ |>+typedef unsigned long elf_greg_t; |>+typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |>+ |>+typedef double elf_fpreg_t; |>+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; |>+ |>+#define GDB_GREGSET_T elf_gregset_t |>+#define GDB_FPREGSET_T elf_fpregset_t |>+ |> #ifndef GDB_GREGSET_T |> #define GDB_GREGSET_T gregset_t |> #endif | | | This part will need some work. (The other parts might too; I haven't | looked closely at them yet.) Anyway, there are several problems here... | | 1) The constants ELF_NGREG, ELF_NFPREG, ELF_NVRREG will almost certainly | be incorrect for other targets. | | 2) Defining elf_greg_t in terms of a long isn't portable. | | 3) Likewise, for elf_fpreg_t being defined in terms of a double. | | For #1, why do these constants need to be put into a header file at | all. Couldn't this knowledge be localized in the portion of the .c | file responsible for decoding the core format? | | For #2 and #3, I think it's reasonably portable to define your data | types in terms of arrays of characters. (Or perhaps in terms of | structs containing arrays of characters. The struct representation | is perhaps more convenient in certain situations.) | | Kevin While I'm at it, I'll fix and re-generate a patch. - -- ============== Martin Gadbois S/W Developper Colubris Networks Inc. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAj1GhocACgkQ9Y3/iTTCEDntHgCdGM8nmYF0AhwtvZLfkrPT5YK6 9OYAn2aEThyBgPfRsFggJXn/R1iyhPdO =Tjd9 -----END PGP SIGNATURE-----