[PATCH v2] Guard against 'current_directory == NULL' on gdb_abspath (PR gdb/23613)
Tom Tromey
tom@tromey.com
Fri Dec 13 22:23:00 GMT 2019
>>>>> "Sergio" == Sergio Durigan Junior <sergiodj@redhat.com> writes:
Sergio> gdb/ChangeLog:
Sergio> 2019-11-21 Sergio Durigan Junior <sergiodj@redhat.com>
Sergio> https://bugzilla.redhat.com/show_bug.cgi?id=1728147
Sergio> PR gdb/23613
Sergio> * bsd-kvm.c (bsd_kvm_target_open): Use 'gdb_abspath'.
Sergio> * corelow.c: Include 'gdbsupport/pathstuff.h'.
Sergio> (core_target_open): Use 'gdb_abspath'.
Sergio> * gdbsupport/pathstuff.c (gdb_abspath): Guard against
Sergio> 'current_directory == NULL' case.
Sergio> * gdbsupport/pathstuff.h (gdb_abspath): Expand comment and
Sergio> explain what happens when 'current_directory' is NULL.
Sergio> * go32-nat.c (go32_nat_target::wait): Check if
Sergio> 'current_directory' is NULL before call to 'chdir'.
Sergio> * source.c (add_path): Use 'gdb_abspath'.
Sergio> * top.c: Include 'gdbsupport/pathstuff.h'.
Sergio> (init_history): Use 'gdb_abspath'.
Sergio> (set_history_filename): Likewise.
Sergio> * tracefile-tfile.c: Include 'gdbsupport/pathstuff.h'.
Sergio> (tfile_target_open): Use 'gdb_abspath'.
Thanks. This is ok.
Tom
More information about the Gdb-patches
mailing list