kraftcheck at gmail dot com
2014-12-02 15:26:19 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=17669
Bug ID: 17669
Summary: edit command wrong source line
Product: gdb
Version: 7.8
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: kraftcheck at gmail dot com
The source line passed to the editor for the 'edit' command appears to
consistently be off by five. The script below will produce this output:
Breakpoint 1, main () at test.c:3
3 int i = 5;
edit +8 /tmp/test.c
Note that source line is 3. Line number passed to editor is 8.
#!/bin/sh
GDB=${HOME}/opt/gdb-7.8.1/bin/gdb
cat >test.c <<end_of_source
int main()
{
int i = 5;
int j = 6;
int k = 1;
return i - j + k;
}
end_of_source
gcc test.c -g -o test
cat <<end_of_gdb | EDITOR=echo $GDB test
b 2
r
edit
q
end_of_gdb
Bug ID: 17669
Summary: edit command wrong source line
Product: gdb
Version: 7.8
Status: NEW
Severity: normal
Priority: P2
Component: cli
Assignee: unassigned at sourceware dot org
Reporter: kraftcheck at gmail dot com
The source line passed to the editor for the 'edit' command appears to
consistently be off by five. The script below will produce this output:
Breakpoint 1, main () at test.c:3
3 int i = 5;
edit +8 /tmp/test.c
Note that source line is 3. Line number passed to editor is 8.
#!/bin/sh
GDB=${HOME}/opt/gdb-7.8.1/bin/gdb
cat >test.c <<end_of_source
int main()
{
int i = 5;
int j = 6;
int k = 1;
return i - j + k;
}
end_of_source
gcc test.c -g -o test
cat <<end_of_gdb | EDITOR=echo $GDB test
b 2
r
edit
q
end_of_gdb
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.