Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: "Martin M. Hunt" <hunt@redhat.com>,
	gdb-patches@sources.redhat.com, kevinb@redhat.com
Subject: Re: [RFA] MIPS DWARF2 CFI support
Date: Fri, 11 Jun 2004 17:42:00 -0000	[thread overview]
Message-ID: <40C9EEE6.1000500@gnu.org> (raw)
In-Reply-To: <20040608040305.GA5511@nevyn.them.org>

> On Mon, Jun 07, 2004 at 08:49:08PM -0700, Martin M. Hunt wrote:
> 
>>> This is really kevinb's work, with some minor tweaks.  I've tested this
>>> on over 50 multilib combinations and it looks goood.
>>> 
>>> 2004-05-26  Kevin Buettner: 
>>> 
>>> 	* dwarf2-frame.c (execute_cfa_program): Fix typo in which the
>>> 	alignment was being added to the offset instead of multiplied.
>>> 
>>> 	* dwarf2-frame.c (struct comp_unit): Add new field ``signed_addr_p''.
>>> 	(encoding_for_size): Add new parameter ``signed_addr_p''.  Adjust
>>> 	all callers.  Add code for handling signed encodings.
>>> 	(dwarf2_build_frame_info): Initialize ``unit.signed_addr_p''.
>>> 
>>> 	* dwarf2-frame.c (dwarf2_build_frame_info): Set unit.addr_size.
>>> 
>>> 	* config/mips/tm-mips.h (SP_REGNUM): Delete define.
>>> 	* mips-tdep.h (MIPS_SP_REGNUM): Define.
>>> 	* mips-tdep.c (mips_gdbarch_init): Set SP_REGNUM via call
>>> 	to set_gdbarch_sp_regnum().  Use cooked register number.
>>> 	(SP_REGNUM): Replace all occurrences with MIPS_SP_REGNUM.
>>> 
>>> 	* mips-tdep.c (mips_gdbarch_init): Set PC_REGNUM (via
>>> 	call to set_gdbarch_pc_regnum()) to cooked register number.
>>> 
>>> 	* mips-tdep.c (dwarf2-frame.h): Include.
>>> 	(mips_gdbarch_init): Enable DWARF2 CFI support.
> 
> 
> I've got three objections:
>   - This is a whole lot of changes.  Please submit them independently,
>     with some sort of attempt at explanation.

(Yes please, the SP_REGNUM looked to be an easy one to split out and the 
bulk of the change).

>>> -  unit.addr_size = objfile->obfd->arch_info->bits_per_address / 8;
>>> +  unit.addr_size = TYPE_LENGTH (builtin_type_void_data_ptr);
>>> +  unit.signed_addr_p = bfd_get_sign_extend_vma (unit.abfd);
> 
> 
>   - This is wrong; please don't introduce dependencies on GDB's type
>     system in dwarf2-frame.c.  I imagine what's there isn't right
>     either because arch_info is completely unreliable on MIPS.  There
>     is already a dwarf64_p where this is used; is that right?
> 
>     Actually, this sounds like a problem in the dwarf3 draft that
>     someone (maybe Jim?) brought up on the dwarf2 list a few weeks ago.
>     Jim, do you remember?
> 
> And somewhat theoretical:
>   - I'd really rather not enable dwarf2 unwinding for MIPS until
>     someone makes a go at fixing the MIPS prologue unwinder.  Either
>     that or rip it out; because after this patch it will get almost
>     zero coverage in the testsuite.  This is an ongoing problem.
>     I know that the existing prologue unwinder is broken at the
>     beginning of functions and in a number of other situations.

I don't think delaying CFI until the prologue unwinder is working is 
reasonable.  However, what would help is the addition of a new more 
specialized stub-unwinder (see hppa and s390) (perhaphs later we can 
return to cleaning up the existing prologue unwinder).  Patches for the 
former (the stub unwinder) more than welcome.

Andrew



      reply	other threads:[~2004-06-11 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-08  3:49 Martin M. Hunt
2004-06-08  4:03 ` Daniel Jacobowitz
2004-06-11 17:42   ` Andrew Cagney [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=40C9EEE6.1000500@gnu.org \
    --to=cagney@gnu.org \
    --cc=drow@false.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hunt@redhat.com \
    --cc=kevinb@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