forked from Imagelibrary/littlefs
Made generated prettyasserts more debuggable
The main star of the show is the adoption of __builtin_trap() for aborting on assert failure. I discovered this GCC/Clang extension recently and it integrates much, _much_ better with GDB. With stdlib's abort(), GDB drops you off in several layers of internal stdlib functions, which is a pain to navigate out of to get to where the assert actually happened. With __builtin_trap(), GDB stops immediately, making debugging quick and easy. This is great! The pain of debugging needs to come from understanding the error, not just getting to it. --- Also tweaked a few things with the internal print functions to make reading the generated source easier, though I realize this is a rare thing to do.
This commit is contained in:
@@ -1366,13 +1366,6 @@ def run(runner, bench_ids=[], **args):
|
||||
'-ex', 'break %s:%d' % (path, lineno),
|
||||
'-ex', 'run',
|
||||
'--args']
|
||||
elif failure.assert_ is not None:
|
||||
cmd[:0] = args['gdb_path'] + [
|
||||
'-q',
|
||||
'-ex', 'run',
|
||||
'-ex', 'frame function raise',
|
||||
'-ex', 'up 2',
|
||||
'--args']
|
||||
else:
|
||||
cmd[:0] = args['gdb_path'] + [
|
||||
'-q',
|
||||
|
||||
Reference in New Issue
Block a user