public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Simon Marchi <simark@simark.ca>
To: John Darrington <john@darrington.wattle.id.au>,
	gdb-patches@sourceware.org
Subject: Re: [PATCH] GDB: Work around buggy Dwarf lineinfo produced by third party compiler.
Date: Sun, 07 Oct 2018 22:21:00 -0000	[thread overview]
Message-ID: <fe4924ed-ed9f-726c-552d-733fbb25bebb@simark.ca> (raw)
In-Reply-To: <20181003084907.29538-1-john@darrington.wattle.id.au>

On 2018-10-03 4:49 a.m., John Darrington wrote:
> * gdb/dwarf2read.c (producer_is_codewarrior): New function.
> * gdb/dwarf2read.c (lnp_state_machine::record_line): Ignore is_stmt
>   flag for records produced by codewarrior.

Hi John,

The code looks good to me, but could you mention (both in the commit log and the
code) what compiler version you are using?  If somebody comes up later and says
this workaround breaks their debugging of codewarrior-generated code, we'll have
a bit of data to sort it out.

I think we've talked about it on IRC, but if I understand correctly, this is not
a maintained product anymore, so there's no use of notifying the publisher so they
fix the problem in the compiler?

On nit, you could use "bool" as a return type for producer_is_codewarrior (the other
producer_is_* functions were written pre-switch-to-C++).

For the ChangeLog, the paths should be relative to the ChangeLog (gdb/ChangeLog)
in this case, so you would remove the leading gdb/.  Also, you would not repeat
the same filename, just put the entries in the same file after.  Finally, there
are some entries missing.  Overall, it could look like this:

	* dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
	(check_producer): Check if the producer is codewarrior.
	(producer_is_codewarrior): New function.
	(lnp_state_machine::record_line): Ignore is_stmt flag for records
	produced by codewarrior.
	(dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.

Thanks,

Simon

      reply	other threads:[~2018-10-07 22:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03  8:49 John Darrington
2018-10-07 22:21 ` Simon Marchi [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=fe4924ed-ed9f-726c-552d-733fbb25bebb@simark.ca \
    --to=simark@simark.ca \
    --cc=gdb-patches@sourceware.org \
    --cc=john@darrington.wattle.id.au \
    /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).