aboutsummaryrefslogtreecommitdiff
path: root/gdb/python
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2024-02-12 14:25:03 -0700
committerTom Tromey <tom@tromey.com>2024-02-12 16:25:40 -0700
commit7417ccf08ef5f1e173d74754c54e64144672f64f (patch)
tree2d99e137dd15973c3577f8829adef8a252ababc9 /gdb/python
parent91095bcf2820f3d77ea1e16a338e686ba6a70e9f (diff)
downloadbinutils-7417ccf08ef5f1e173d74754c54e64144672f64f.zip
binutils-7417ccf08ef5f1e173d74754c54e64144672f64f.tar.gz
binutils-7417ccf08ef5f1e173d74754c54e64144672f64f.tar.bz2
Introduce bfd_print_error function
gdb likes to control its own output; for example, this is important for gdb's pager, and for logging. While BFD provides a way to intercept error output, via bfd_set_error_handler, it turns out to be difficult for this function to truly generate the desired output in a gdb-friendly way -- the error handler is expected to implement some BFD printf format extensions. This patch introduces a new function that an error handler can use to format the text. This way, gdb can set the error handler and arrange for the output to be displayed as it likes. * bfd.c (bfd_print_callback): Rename from print_func. Move into comment. (_bfd_doprnt): Update. (bfd_print_error): New function. (error_handler_fprintf, error_handler_sprintf): Use bfd_print_error. * bfd-in2.h: Rebuild.
Diffstat (limited to 'gdb/python')
0 files changed, 0 insertions, 0 deletions