Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Lluís Batlle i Rossell" <viric@viric.name>
To: Andrew Burgess <aburgess@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Re: [PATCH] Fix 'edit' command to go to right line
Date: Thu, 7 Nov 2024 13:01:26 +0100	[thread overview]
Message-ID: <aegskdhcmurxfssapeeh7cm5ckp4tix5paewag6pxvpznkle4o@fvphdawb3dcj> (raw)
In-Reply-To: <87pln7qotz.fsf@redhat.com>

On Thu, Nov 07, 2024 at 11:13:12AM +0000, Andrew Burgess wrote:
> Lluís Batlle i Rossell <viric@viric.name> writes:
> 
> > I attach this patch I used more than 20 years ago.
> >
> > I thought I had sent it in these years but apparently not.
> > From fc0f3f1200f18c86a6d90185f02b1f5ce0c0235b Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= <viric@viric.name>
> > Date: Tue, 5 Nov 2024 23:18:30 +0100
> > Subject: [PATCH] Fix 'edit' command to go to right line
> >
> > The cursor was placed at a line off by a bunch of lines.
> 
> Thanks for reporting this issue.  I took a look at this patch and
> started writing some tests for the 'edit' command.  It would seem that
> this was mostly untested until now!
> 
> Anyway, though your patch does fix some cases, I found a bunch more
> problems, so I'd like to propose the patch below as an alternative.
> 
> I hope this should fix the case that I think you care about, though I'm
> guessing really as you didn't describe exactly which case you believe
> this fixes.  If you are willing to give this alternative patch a try,
> and report if this fixes your use case or not that would be really
> helpful.
> 
> Thanks,
> Andrew

(Now replying Cc to the list)

Sure! Use your patch.

I have EDITOR=vim. And when I'm debugging in some frame, I run 'edit' to
get me to that position in vim.

I don't really understand what is the get_first_line_listed ()
situation... I think it means that if 'list' has been run, then the editor
on 'edit' will point to the line in the middle of the last 'list'.
I like this as well, if I interpret correctly.

Thanks,
Lluís.

  reply	other threads:[~2024-11-07 12:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 22:23 Lluís Batlle i Rossell
2024-11-07 11:13 ` Andrew Burgess
2024-11-07 12:01   ` Lluís Batlle i Rossell [this message]
2024-11-07 13:22     ` Andrew Burgess
2024-11-07 13:17   ` [PATCHv2] gdb: fixes and tests for the 'edit' command Andrew Burgess
2024-11-07 15:03     ` Tom Tromey
2024-11-08 10:51       ` Andrew Burgess
2024-11-08 13:28         ` Lluís Batlle i Rossell

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=aegskdhcmurxfssapeeh7cm5ckp4tix5paewag6pxvpznkle4o@fvphdawb3dcj \
    --to=viric@viric.name \
    --cc=aburgess@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /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