public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@mips.com>
To: Simon Marchi <simon.marchi@ericsson.com>
Cc: Simon Marchi <simark@simark.ca>, Tom Tromey <tom@tromey.com>,
	Yao Qi	<qiyaoltc@gmail.com>, <gdb-patches@sourceware.org>
Subject: Re: [RFA 1/2] Make line tables independent of progspace
Date: Thu, 29 Mar 2018 21:07:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.00.1803291900570.2163@tp.orcam.me.uk> (raw)
In-Reply-To: <4ca333ee-44da-d086-e3c2-cd65b46a46c1@ericsson.com>

On Thu, 29 Mar 2018, Simon Marchi wrote:

> Since adjust_dwarf2_line used to be passed the relocated address, Tom included a
> "hack" where he relocates the address, passes it through gdbarch_adjust_dwarf2_line,
> and unrelocates it:
> 
>   /* Handle DW_LNE_set_address.  */
>   void handle_set_address (CORE_ADDR baseaddr, CORE_ADDR address)
>   {
>     m_op_index = 0;
>     /* Pass the relocated address to the gdbarch for modification, but
>        then only store the relative address.  */
>     address += baseaddr;
>     m_address = (gdbarch_adjust_dwarf2_line (m_gdbarch, address, false)
> 		 - baseaddr);
>   }
> 
> I think right now this is necessary, because mips_adjust_dwarf2_line does a
> minimal symbol lookup, which are relocated.  So if we passed an unrelocated
> address, I guess it wouldn't find the symbol.

 Yeah, I guess it's all right, the difference will ever be either 1 or 0.

 I would pass it through MIPS16 and/or microMIPS regression testing to be 
sure.  We have the Good Friday public holiday tomorrow here in the UK and 
then Easter Monday, so I won't be able to schedule a test run until 
sometime next week though.

> I just wanted to make sure there wasn't anything you saw that is obviously
> wrong with this approach.  I think that eventually we'll be able to pass an
> unrelocated address to adjust_dwarf2_line, but in the mean time we probably
> need this hack.

 This piece and the associated infrastructure is scheduled to go once Yao 
has sorted the issue with function descriptions and his proposed change: 
<https://sourceware.org/ml/gdb-patches/2016-10/msg00430.html>, when we'll 
be able to reduce the amount of hackery required to handle the broken 
debug record generation for compressed MIPS code (where the ISA bit is set 
in line records, but not in any other debug records).  At that point we'll 
have to have a hook to remove the ISA bit from line entries instead 
though; perhaps that'll be the very `gdbarch_addr_bits_remove'.

  Maciej

  reply	other threads:[~2018-03-29 21:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 17:18 [RFA 0/2] " Tom Tromey
2018-03-21 17:18 ` [RFA 1/2] " Tom Tromey
2018-03-24  3:40   ` Simon Marchi
2018-03-27  4:16     ` Tom Tromey
2018-03-27  4:53       ` Tom Tromey
2018-03-27 20:22         ` Simon Marchi
2018-03-28  4:53           ` Tom Tromey
2018-03-28 12:30             ` Simon Marchi
2018-03-28  3:34         ` Simon Marchi
2018-03-28  5:02           ` Tom Tromey
2018-03-28 12:32             ` Simon Marchi
2018-03-28 19:33           ` Maciej W. Rozycki
2018-03-29 15:04             ` Simon Marchi
2018-03-29 21:07               ` Maciej W. Rozycki [this message]
2018-04-26 21:30                 ` Tom Tromey
2018-05-03 23:17                   ` Maciej W. Rozycki
2018-05-14 23:54                     ` Maciej W. Rozycki
2018-03-21 17:18 ` [RFA 2/2] Constify the line table Tom Tromey

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=alpine.DEB.2.00.1803291900570.2163@tp.orcam.me.uk \
    --to=macro@mips.com \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    --cc=simark@simark.ca \
    --cc=simon.marchi@ericsson.com \
    --cc=tom@tromey.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).