From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29492 invoked by alias); 25 Apr 2002 02:07:51 -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 29485 invoked from network); 25 Apr 2002 02:07:51 -0000 Received: from unknown (HELO localhost.redhat.com) (216.138.202.10) by 209.249.29.67 with SMTP; 25 Apr 2002 02:07:51 -0000 Received: from cygnus.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 68C403D33; Wed, 24 Apr 2002 22:07:39 -0400 (EDT) Message-ID: <3CC764EB.7020506@cygnus.com> Date: Wed, 24 Apr 2002 19:07:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:0.9.9) Gecko/20020424 X-Accept-Language: en-us, en MIME-Version: 1.0 To: "David S. Miller" Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] Multi-arch DECR_PC_AFTER_HW_BREAKPOINT References: <20020422.023127.101567315.davem@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-04/txt/msg00998.txt.bz2 Hmm, + if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) + && (gdbarch->decr_pc_after_hw_break == -1)) + fprintf_unfiltered (log, "\n\tdecr_pc_after_hw_break"); -#ifndef DECR_PC_AFTER_HW_BREAK -#define DECR_PC_AFTER_HW_BREAK 0 -#endif +extern CORE_ADDR gdbarch_decr_pc_after_hw_break (struct gdbarch *gdbarch); +extern void set_gdbarch_decr_pc_after_hw_break (struct gdbarch *gdbarch, CORE_A DDR decr_pc_after_hw_break); +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (DECR_PC_AFTER_HW_BREA K) +#error "Non multi-arch definition of DECR_PC_AFTER_HW_BREAK" +#endif +#if GDB_MULTI_ARCH +#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (DECR_PC_AFTER_HW_BRE AK) +#define DECR_PC_AFTER_HW_BREAK (gdbarch_decr_pc_after_hw_break (current_gdbarch )) +#endif +#endif + Keep in mind that a multi-arch conversion should, in no way, alter GDB's behavour. GDB shall continue to build and/or run on any of the targets listed in the MAINTAINER file. I suspect for the above, you want something like TARGET_SHORT_BIT. As things are: v850-elf (and other non-multi-arch targets) don't build: /home/scratch/GDB/src/gdb/breakpoint.c:2467: `DECR_PC_AFTER_HW_BREAK' undeclared (first use in this function) /home/scratch/GDB/src/gdb/breakpoint.c:2467: (Each undeclared identifier is reported only once /home/scratch/GDB/src/gdb/breakpoint.c:2467: for each function it appears in.) cris-elf and other multi-arch targets panic: (gdb) maint print architecture ..../home/scratch/GDB/src/gdb/gdbarch.c:3948: gdb-internal-error: gdbarch: gdbarch_decr_pc_after_hw_break invalid An internal GDB error was detected. This may make further debugging unreliable. Quit this debugging session? (y or n) Can you please ensure that all the targets listed in the MAINTAINERS file still build and pass a smoke-test. > The GAWK segment: > > awk < "${maintainers}" ' > $2 ~ /--target=.*/ { > targets = gensub (/^.*--target=/, "", 1, $2) > warnings = gensub (/[)]*$/, "", 1, $3) > split (targets, targ, /,/) > for (i in targ) { > print targ[i], warnings > } > }' > > can be used to generate a full list of --target= > --enable-gdb-build-warnings= pairs. (Richard Earnshaw posted a pretty neat shell script to help with this). The other part, you've figured out (thanks!), is that the changes need to be small. This is so that when (not if) a change breaks a target, the developers can very quickly drill down to the specific change that caused problems. enjoy, Andrew