Module: wine Branch: master Commit: fd87ddfae795b438addc463366a7f8d03fe4f750 URL: https://gitlab.winehq.org/wine/wine/-/commit/fd87ddfae795b438addc463366a7f8d...
Author: Eric Pouech epouech@codeweavers.com Date: Mon Apr 17 18:43:53 2023 +0200
winedbg: Let 'break symbol : line' command work again.
Signed-off-by: Eric Pouech epouech@codeweavers.com
---
programs/winedbg/break.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/break.c b/programs/winedbg/break.c index 6cff37eb886..88c8eef20ab 100644 --- a/programs/winedbg/break.c +++ b/programs/winedbg/break.c @@ -340,8 +340,17 @@ void break_add_break_from_lineno(const char *filename, int lineno, BOOL swbp) if (bkln.addr.Offset) break_add_break(&bkln.addr, TRUE, swbp); else - dbg_printf("Unknown line number\n" - "(either out of file, or no code at given line number)\n"); + { + /* winedbg's lexer can't tell in 'break foo : 3' whether foo shall be interpreted + * as a debuggee symbol or as a debuggee source file. + * Try now symbol since source file failed. + */ + if (filename) + break_add_break_from_id(filename, lineno, swbp); + else + dbg_printf("Unknown line number\n" + "(either out of file, or no code at given line number)\n"); + } }
/***********************************************************************