Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Tom de Vries <tdevries@suse.de>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/symtab] Handle setting line bp without debug line info
Date: Fri, 16 Oct 2020 14:38:35 -0600	[thread overview]
Message-ID: <87eelxoqic.fsf@tromey.com> (raw)
In-Reply-To: <20201016140006.GA22271@delia> (Tom de Vries's message of "Fri, 16 Oct 2020 16:00:07 +0200")

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> When setting a breakpoint on a line in an executable without debug line info,
Tom> we run into an abort.

I guess the idea is that there is some debug info but somehow the line
numbers are missing?

Tom> +	/* We couldn't find the location of `main', possibly due to missing
Tom> +	   line number info, fall back to line 1 in the corresponding file.  */
Tom> +	loc->set (symbol_symtab (bsym.symbol), 1);

... which is why the symbol and symtab are set but the line number is
not.

The patch seems fine to me.  In general it seems to me that it's ok to
work around pathological / broken cases like this when possible, even if
the results aren't perfect.

Tom

      reply	other threads:[~2020-10-16 21:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 14:00 Tom de Vries
2020-10-16 20:38 ` Tom Tromey [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=87eelxoqic.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tdevries@suse.de \
    /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