Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Fix 'edit' command to go to right line
@ 2024-11-05 22:23 Lluís Batlle i Rossell
  2024-11-07 11:13 ` Andrew Burgess
  0 siblings, 1 reply; 8+ messages in thread
From: Lluís Batlle i Rossell @ 2024-11-05 22:23 UTC (permalink / raw)
  To: gdb-patches

[-- 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-11-08 13:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-05 22:23 [PATCH] Fix 'edit' command to go to right line Lluís Batlle i Rossell
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox