[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #33172] DDD has problems parsing Temporary breakpoints
From: |
Matheus Ribeiro |
Subject: |
[bug #33172] DDD has problems parsing Temporary breakpoints |
Date: |
Wed, 27 Apr 2011 17:10:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24 |
URL:
<http://savannah.gnu.org/bugs/?33172>
Summary: DDD has problems parsing Temporary breakpoints
Project: DDD
Submitted by: matferib
Submitted on: Wed 27 Apr 2011 05:10:06 PM GMT
Category: Breakpoint/Watchpoint
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: None
_______________________________________________________
Details:
There is a bug in DDD when setting temporary breakpoints (which is also used
by other commands, like set execution point). The answer received from GDB is
something like
Breakpoint X at ADDRESS: file FILENAME, line LINE. << for breakpoints
Temporary breakpoint X at ADDRESS: file FILENAME, line LINE. << for tbreaks
In PosBuffer.C, there is a function which parses gdb answers and acquires
information from it: gdb_filter. This function tries several cases, one of
them is the UP and DOWN command outputs, with this if statement:
<code>
int at_index = answer.index(" at ");
int br_index = answer.index("Break");
if ( (at_index > 0) && (br_index < 0) )
</code>
As can be see, it looks for an "at" string at sentence not started by Break.
But his comparison is bugged for temporary breakpoints, the correct code is:
<code>
int at_index = answer.index(" at ");
int br_index = answer.index("Break");
int tbr_index = answer.index("Temporary break");
if ( (at_index > 0) && (br_index < 0) && (tbr_index < 0) )
</code>
This will avoid many weird messages like: cannot find file /usr/src/0x12345
for example. Also it will avoid many unecessary info sources by ddd trying to
find this weird file. If anyone wants a patch, let me know.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?33172>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #33172] DDD has problems parsing Temporary breakpoints,
Matheus Ribeiro <=