From: Richard Earnshaw <rearnsha@arm.com>
To: gdb-patches@sources.redhat.com
Cc: Richard.Earnshaw@arm.com
Subject: Re: RFC ARM multi-arch and object format detection
Date: Fri, 15 Feb 2002 05:45:00 -0000 [thread overview]
Message-ID: <200202151344.NAA17232@cam-mail2.cambridge.arm.com> (raw)
In-Reply-To: Your message of "Thu, 14 Feb 2002 18:37:07 GMT." <200202141837.SAA25550@cam-mail2.cambridge.arm.com>
Right, I've revised the patch slightly and committed it.
The main difference is that with a flash of inspiration last night as I
was driving home from work, I realized that there is a simple way to
support the multiple ABI variants and their corresponding tdep files
without having to always link all of them into a single gdb session (you
can do if you want, but it's not required).
The new patch adds a new arm-specific gdbarch registration function
(arm_gdbarch_register_os_abi) to arm-tdep.c, using which the other arm
tdep files can register their ability to handle that ABI variant. ABI
detection is still handled by the common code -- a design decision which I
think is correct, but can be changed at a later date.
It is acceptable for a tdep file to register the ability to handle more
than one abi variant, but it is not acceptable to have more than one tdep
file trying to handle a variant.
2002-02-15 Richard Earnshaw <rearnsha@arm.com>
* arm-tdep.h (enum arm_abi): New enum.
(struct gdbarch_tdep): New structure.
(LOWEST_PC): Provide a default.
(arm_gdbarch_register_os_abi): Declare new function.
* arm-tdep.c (arm_abi_names): New array.
(process_note_abi_tag_sections): New function.
(get_elfosabi): New function.
(arm_gdbarch_register_os_abi): New function.
(arm_gdbarch_init): Try to determine the ABI of the inferior. If
support for that ABI has been built in, then call the appropriate
configuration routine. Use gdbarch_num_regs() to get the number
of registers.
(arm_dump_tdep): New function.
(arm_init_abi_eabi_v1, arm_init_abi_eabi_v2, arm_init_abi_apcs): New
place-holder functions.
(_initialize_arm_tdep): Register them.
* config/arm/tm-arm.h (LOWEST_PC): Delete.
* armnbsd-tdep.c: New file.
* Makefile.in (armnbsd-tdep.o): Add dependencies.
* config/arm/nbsd.mt (TDEPFILES): Add it.
* config/arm/tm-nbsd.h (LOWEST_PC): Delete.
* armnbsd-nat.c: Include regcache.h.
* Makefile.in (armnbsd-nat.o): Update dependency list.
* arm-tdep.c (arm_get_next_pc): Use printf_filtered for error message.
prev parent reply other threads:[~2002-02-15 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-14 10:37 Richard Earnshaw
2002-02-15 5:45 ` Richard Earnshaw [this message]
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=200202151344.NAA17232@cam-mail2.cambridge.arm.com \
--to=rearnsha@arm.com \
--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