Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: LRN <lrn1986@gmail.com>
To: gdb-patches@sourceware.org
Cc: tom@tromey.com
Subject: Re: [PATCH] Apply substitute-path to relative filenames as well
Date: Wed, 27 Mar 2019 22:59:00 -0000	[thread overview]
Message-ID: <931d12a3-41ad-af6a-6aef-d53ad149696a@gmail.com> (raw)
In-Reply-To: <87lg10knii.fsf@tromey.com>


[-- Attachment #1.1: Type: text/plain, Size: 1614 bytes --]

On 28.03.2019 0:36, Tom Tromey wrote:
> LRN writes:
> 
>> Hey, it's been a week. Do i need to do something to move this along? (Please,
>> don't say "test case" :( )
> 
> Is it possible to write one?  I didn't think about it in detail.
> 
> I see there are already tests in gdb.base/subst.exp.  Perhaps it could
> be extended?

These tests only test the interactive output of gdb with regards to subst
commands. I.e. it issues a command, such as "show substitute-path", and then
matches the output to the one it expects.

My patch influences the output only when gdb is actually debugging something -
which means that the test must compile some program (using relative path to the
source file!), run it under gdb, set up a breakpoint, verify that the source
path printed at the breakpoint hit is relative (and unresolved - the test would
probably need to move the source file before running?), then use subst, then
probably restart and verify that the path is non-relative and resolved when the
same breakpoint hits.

Okay, maybe it can be done without breakpoints - just run and list
../../path/to/sourcefile.c:0 or something.

Anyway, that still sounds an order of magnitude more complicated that
subst.exp, so i would rather not try to implement all that using completely
unfamiliar testing framework that i do not have.

> 
> Also the review had a little nit that could be addressed.
> 

I did address it. The first follow-up[0] message had the new version of the
patch attached, with the nit fixed.

[0]: https://www.sourceware.org/ml/gdb-patches/2019-03/msg00082.html


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2019-03-27 22:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 12:52 LRN
2019-03-05 22:24 ` Tom Tromey
2019-03-06 10:06   ` LRN
2019-03-13 12:47   ` LRN
2019-03-20 10:24     ` LRN
2019-03-27 21:36     ` Tom Tromey
2019-03-27 22:59       ` LRN [this message]
2019-03-29 20:51         ` Tom Tromey
2019-06-06 18:01           ` 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=931d12a3-41ad-af6a-6aef-d53ad149696a@gmail.com \
    --to=lrn1986@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --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