@@ -106,7 +106,7 @@ def run_test_case(test_name, update_snapshots: false)
106106 result = run_gdb_script ( gdb_script )
107107 end
108108
109- return { success? : false , error : "GDB script failed" } unless result && result [ :success? ]
109+ return { success? : false , error : "GDB script failed" , raw_output : result ? result [ :stdout ] : nil } unless result && result [ :success? ]
110110
111111 actual_output = normalize_output ( result [ :stdout ] )
112112
@@ -146,7 +146,8 @@ def run_test_case(test_name, update_snapshots: false)
146146 success? : false ,
147147 output : actual_output ,
148148 expected : expected_output ,
149- diff : compute_diff ( expected_output , actual_output )
149+ diff : compute_diff ( expected_output , actual_output ) ,
150+ raw_output : result [ :stdout ]
150151 }
151152 end
152153 end
@@ -165,6 +166,13 @@ def normalize_output(output)
165166 line . match? ( /^License/ ) ||
166167 line . match? ( /^This is free software/ ) ||
167168 line . match? ( /^There is NO WARRANTY/ ) ||
169+ line . match? ( /^For bug reporting/ ) || # Bug reporting instructions
170+ line . match? ( /^Find the GDB manual/ ) || # Manual reference
171+ line . match? ( /^Reading symbols/ ) || # Symbol loading (any variant)
172+ line . match? ( /^Dwarf Error:/ ) || # DWARF debug info errors
173+ line . match? ( /warning:.*debug.*info/ ) || # Debug info warnings
174+ line . match? ( /Make breakpoint pending/ ) || # Breakpoint pending question
175+ line . match? ( /answered [YN]; input not from terminal/ ) || # Breakpoint pending answer
168176 # Remove lines with process/thread IDs that change on each run
169177 line . match? ( /\b LWP \d +\b / ) || # Linux thread IDs
170178 line . match? ( /\b process \d +\b / ) || # Process IDs
@@ -175,8 +183,8 @@ def normalize_output(output)
175183 line . match? ( /^\[ New Thread/ ) || # New thread messages
176184 line . match? ( /^\[ Inferior / ) || # Inferior process messages
177185 line . match? ( /^Using host libthread_db/ ) || # Thread debugging library
178- line . match? ( /^Reading symbols from / ) || # Symbol loading
179- line . match? ( /Breakpoint \d + at 0x[0-9a-f]+: / ) # Breakpoint addresses (keep line number only )
186+ line . match? ( /Breakpoint \d + at 0x[0-9a-f]+: / ) || # Breakpoint addresses (keep line number only)
187+ line . match? ( /^ \d +\s + / ) # Source code lines (e.g., "9016 VALUE r_stdout..." )
180188 end
181189
182190 # Normalize lines to remove non-deterministic values
0 commit comments