From fd87ddfae795b438addc463366a7f8d03fe4f750 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 17 Apr 2023 18:43:53 +0200 Subject: [PATCH] winedbg: Let 'break symbol : line' command work again. Signed-off-by: Eric Pouech --- 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"); + } } /***********************************************************************