Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: "David S. Miller" <davem@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Multi-arch DECR_PC_AFTER_HW_BREAKPOINT
Date: Wed, 24 Apr 2002 19:07:00 -0000	[thread overview]
Message-ID: <3CC764EB.7020506@cygnus.com> (raw)
In-Reply-To: <20020422.023127.101567315.davem@redhat.com>

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


  parent reply	other threads:[~2002-04-25  2:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-22  2:40 David S. Miller
2002-04-22  2:45 ` David S. Miller
2002-04-22  2:46 ` Momchil Velikov
2002-04-22  2:49   ` David S. Miller
2002-04-22  8:44 ` Jason R Thorpe
2002-04-22 17:18   ` David S. Miller
2002-04-24 19:07 ` Andrew Cagney [this message]
2002-04-24 19:11   ` David S. Miller

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=3CC764EB.7020506@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=davem@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /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