From: Pierre Muller <muller@cerbere.u-strasbg.fr>
To: gdb-patches@sources.redhat.com
Cc: Richard.Earnshaw@arm.com
Subject: Re: PATCH multi-arch GET_LONGJMP_TARGET
Date: Tue, 19 Feb 2002 00:48:00 -0000 [thread overview]
Message-ID: <4.2.0.58.20020219092651.00ad0668@ics.u-strasbg.fr> (raw)
In-Reply-To: <200202181337.NAA19035@cam-mail2.cambridge.arm.com>
At 14:37 18/02/2002 , Richard Earnshaw a écrit:
>This patch multi-arches GET_LONGJMP_TARGET, using the predicate variant
>with
>GET_LONGJMP_TARGET_P() telling us whether the architecture supports this
>or not.
>
>Committed as obvious for multi-arch.
>
>R.
>
>2002-02-18 Richard Earnshaw <rearnsha@arm.com>
>
> * gdbarch.sh (GET_LONGJMP_TARGET): Add rule.
> * gdbarch.c gdbarch.h: Regenerate.
> * breakpoint.c (create_longjmp_breakpoint): Always compile this
> function.
> (breakpoint_reset): Test GET_LONGJMP_TARGET_P().
> * infrun.c (GET_LONGJMP_TARGET): Delete default definition.
> (handle_inferior_event): Test GET_LONGJMP_TARGET_P().
>
> * arm-tdep.h (struct gdbarch_tdep): Add jb_pc and jb_elt_size fields.
> * arm-tdep.c (arm_get_longjmp_target): New function.
> (arm_gdbarch_init): Initialize jb_pc to -1. If ABI handler changes
> this to a positive value register arm_get_longjmp_target as the
> longjmp handler.
> * arm-linux-tdep.c (arm_get_longjmp_target): Delete.
> (arm_linux_init_abi): Set up longjmp description in tdep.
> * armnbsd-nat.c (get_longjmp_target): Delete.
> * armnbsd-tdep.c (arm_netbsd_init_abi_common): Set up longjmp
> description in tdep.
> * config/arm/tm-nbsd.h (JB_ELEMENT_SIZE, JB_PC): Delete.
> (get_longjmp_target): Delete declaration.
> (GET_LONGJMP_TARGET): Delete.
> * config/arm/tm-linux.h (arm_get_longjmp_target): Delete declaration.
> (GET_LONGJMP_TARGET): Delete.
This patch makes that
GET_LONGJMP_TARGET is always defined for all mutiarched target
(even partial !).
Thus it breaks compilation of Cygwin native GDB,
because JB_PC and JB_ELEMENT_SIZE are not defined for these targets.
(and several other i386 targets)
The correct fix would be to add these values to gdbarch ...
The following was committed as an obvious fix.
2002-02-19 Pierre Muller <muller@ics.u-strasbg.fr>
* i386-tdep.c (get_longjmp_target): Fix compilation failure
by setting dummy values to JB_PC and JB_ELEMENT_SIZE
if not defined.
Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.50
diff -u -p -r1.50 i386-tdep.c
--- i386-tdep.c 2002/01/01 16:29:43 1.50
+++ i386-tdep.c 2002/02/19 08:42:36
@@ -839,6 +839,16 @@ i386_pop_frame (void)
#ifdef GET_LONGJMP_TARGET
+/* FIXME: Multi-arching does not set JB_PC and JB_ELEMENT_SIZE yet.
+ Fill in with dummy value to enable compilation. */
+#ifndef JB_PC
+#define JB_PC 0
+#endif /* JB_PC */
+
+#ifndef JB_ELEMENT_SIZE
+#define JB_ELEMENT_SIZE 4
+#endif /* JB_ELEMENT_SIZE */
+
/* Figure out where the longjmp will land. Slurp the args out of the
stack. We expect the first arg to be a pointer to the jmp_buf
structure from which we extract the pc (JB_PC) that we will land
Pierre Muller
Institut Charles Sadron
6,rue Boussingault
F 67083 STRASBOURG CEDEX (France)
mailto:muller@ics.u-strasbg.fr
Phone : (33)-3-88-41-40-07 Fax : (33)-3-88-41-40-99
next prev parent reply other threads:[~2002-02-19 8:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-18 5:38 Richard Earnshaw
2002-02-19 0:48 ` Pierre Muller [this message]
2002-02-19 2:14 ` Richard Earnshaw
2002-02-19 2:42 ` Richard Earnshaw
2002-02-20 2:49 ` Richard Earnshaw
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=4.2.0.58.20020219092651.00ad0668@ics.u-strasbg.fr \
--to=muller@cerbere.u-strasbg.fr \
--cc=Richard.Earnshaw@arm.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