From 7ac018954bd9c2d964204a451ecabdd7d8a11945 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Fri, 17 Jul 2015 08:29:26 -0700 Subject: Make binutils abort message GDB friendly We used to generate abort messages like: internal error, aborting at .../bfd/elf64-x86-64.c line 1554 in elf_x86_64_check_relocs We can't cut and paste "file line ???" to GDB. This patch changes those abort messages to internal error, aborting at .../bfd/elf64-x86-64.c:1554 in elf_x86_64_check_relocs so that we can cut and paste "file:???" to GDB. bfd/ * bfd.c (_bfd_abort): Replace " line " with ":" in output message. gas/ * messages.c (as_assert): Replace " line " with ":" in output message. (as_abort): Likewise. ld/ * ldmisc.c (ld_abort): Replace " line " with ":" in output message. --- ld/ldmisc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ld/ldmisc.c') diff --git a/ld/ldmisc.c b/ld/ldmisc.c index 3b0d126..4659921 100644 --- a/ld/ldmisc.c +++ b/ld/ldmisc.c @@ -534,10 +534,10 @@ void ld_abort (const char *file, int line, const char *fn) { if (fn != NULL) - einfo (_("%P: internal error: aborting at %s line %d in %s\n"), + einfo (_("%P: internal error: aborting at %s:%d in %s\n"), file, line, fn); else - einfo (_("%P: internal error: aborting at %s line %d\n"), + einfo (_("%P: internal error: aborting at %s:%d\n"), file, line); einfo (_("%P%F: please report this bug\n")); xexit (1); -- cgit v1.1