From: "Lluís Batlle i Rossell" <viric@viric.name>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix 'edit' command to go to right line
Date: Tue, 5 Nov 2024 23:23:49 +0100 [thread overview]
Message-ID: <osmtfvf5xe3yx4n7oirukidym4cik7lehhy4re5mxpset2qgwt@6qlboxhqiwgm> (raw)
[-- Attachment #1: Type: text/plain, Size: 111 bytes --]
I attach this patch I used more than 20 years ago.
I thought I had sent it in these years but apparently not.
[-- Attachment #2: 0001-Fix-edit-command-to-go-to-right-line.patch --]
[-- Type: text/plain, Size: 719 bytes --]
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.
---
gdb/cli/cli-cmds.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index 65ac7d6e7fb..54bef435e86 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -973,7 +973,6 @@ edit_command (const char *arg, int from_tty)
{
if (sal.symtab == 0)
error (_("No default source file yet."));
- sal.line += get_lines_to_list () / 2;
}
else
{
--
2.44.1
next reply other threads:[~2024-11-05 22:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-05 22:23 Lluís Batlle i Rossell [this message]
2024-11-07 11:13 ` Andrew Burgess
2024-11-07 12:01 ` Lluís Batlle i Rossell
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=osmtfvf5xe3yx4n7oirukidym4cik7lehhy4re5mxpset2qgwt@6qlboxhqiwgm \
--to=viric@viric.name \
--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