Skip to content

Commit ae04b5f

Browse files
authored
Merge pull request #151 from duncan-roe/hack_fix
Expand test to not use line number hack
2 parents ddf2fbe + 345d26f commit ae04b5f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

libdebugger/fns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,8 +319,8 @@ print_debugger_location(const file_t *p_target, debug_enter_reason_t reason,
319319
before the first command? Or should we list the line
320320
that the command starts on - so we know we've faked the location?
321321
*/
322-
/* Not OK to subtract 1 if b_debugger_goal sent us here */
323-
if (!b_debugger_goal) {
322+
/* Not OK to subtract 1 if already zero */
323+
if (floc.lineno) {
324324
floc.lineno--;
325325
}
326326
p_target_loc->filenm = floc.filenm;

src/print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,8 @@ print_target_stack_entry (const file_t *p_target, int i, int i_pos)
309309
before the first command? Or should we list the line
310310
that the command starts on - so we know we've faked the location?
311311
*/
312-
/* Not OK to subtract 1 if b_debugger_goal sent us here */
313-
if (!b_debugger_goal) {
312+
/* Not OK to subtract 1 if already zero */
313+
if (floc.lineno) {
314314
floc.lineno--;
315315
}
316316
} else {

0 commit comments

Comments
 (0)