Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: hunt@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] dwarf2-frame.c sign extension patch
Date: Wed, 21 Jul 2004 20:30:00 -0000	[thread overview]
Message-ID: <200407212029.i6LKThsR022356@copland.kettenis.dyndns.org> (raw)
In-Reply-To: <1090350684.3030.10.camel@dragon> (hunt@redhat.com)

   From: "Martin M. Hunt" <hunt@redhat.com>
   Date: Tue, 20 Jul 2004 12:11:25 -0700

   This patch fixes some dwarf2 problems with sign-extension.

   2004-07-20  Kevin Buettner and Martin Hunt  <hunt@redhat.com>

	   * dwarf2-frame.c (execute_cfa_program): Fix typo in which the
	   alignment was being added to the offset instead of multiplied.

This is unrelated to the rest of the changes.  Please make this a
seperate commit.  Consider that one pre-approved.

	   (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''.

These are all related, so there shouldn't be any blank lines between
them.  The formatting of your changes to encoding_for_size() is wrong.
Please re-indent the exitsing return()-lines.  Or perhaps it's better
to use:

  return signed_addr_p ? DW_EH_PE_sdata4 : DW_EH_PE_udata4;

	   (dwarf2_build_frame_info): Set unit.addr_size.

Why is the old code wrong?  The comment clearly says "from unit
header" which is what the DWARF standard says (or at least implies).
Theoretically it could change from compilation unit to compilation
unit.  So I think your change to replace it by
TYPE_LENGTH(builtin_type_void_data_ptr) is wrong.

Mark


  reply	other threads:[~2004-07-21 20:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-20 19:11 Martin M. Hunt
2004-07-21 20:30 ` Mark Kettenis [this message]
2004-07-21 21:18   ` Daniel Jacobowitz
2004-07-22  0:41     ` Kevin Buettner
2004-07-22  0:47       ` Daniel Jacobowitz
2004-07-22 20:46         ` Mark Kettenis
2004-07-22 20:59           ` Daniel Jacobowitz
2004-07-23 17:54           ` Martin M. Hunt
2004-07-23 22:10             ` Mark Kettenis

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=200407212029.i6LKThsR022356@copland.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hunt@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