@@ -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,17 @@ 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
176+ line . match? ( /^Breakpoint \d + \( .+\) pending\. / ) || # Pending breakpoint notification
177+ line . match? ( /^A debugging session is active\. / ) || # Debugging session messages
178+ line . match? ( /Inferior.*will be killed\. / ) || # Session termination messages
179+ line . match? ( /Quit anyway\? / ) || # Quit confirmation prompts
168180 # Remove lines with process/thread IDs that change on each run
169181 line . match? ( /\b LWP \d +\b / ) || # Linux thread IDs
170182 line . match? ( /\b process \d +\b / ) || # Process IDs
@@ -175,8 +187,8 @@ def normalize_output(output)
175187 line . match? ( /^\[ New Thread/ ) || # New thread messages
176188 line . match? ( /^\[ Inferior / ) || # Inferior process messages
177189 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 )
190+ line . match? ( /Breakpoint \d + at 0x[0-9a-f]+: / ) || # Breakpoint addresses (keep line number only)
191+ line . match? ( /^ \d +\s + / ) # Source code lines (e.g., "9016 VALUE r_stdout..." )
180192 end
181193
182194 # Normalize lines to remove non-deterministic values
0 commit comments