public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jonny Grant <jg@jguk.org>
To: gdb@sourceware.org
Subject: gdb "Core was generated by" truncated to 80 characters
Date: Tue, 26 May 2020 12:07:34 +0100	[thread overview]
Message-ID: <b86d8d4e-0ea6-7eae-16f8-2f3d8df5d6d8@jguk.org> (raw)

[Not sure if this got through to bug-gdb@gnu.org  so resending]

Hello

Just noticed my command line args of a core file are truncated, so it's hard to reproduce the crash as I don't know what 
the core was generated from.

"Core was generated by" truncated to 80 characters in the below example.

May I ask, is this a limitation of the kernel dump or gdb? When i use 'strings' I see the core does contain the full 
command line.

Sorry I know my gdb isn't the latest, it's Ubuntu LTS

I tried setting .gdbinit 'set width unlimited'
but the output is still truncated.

Example below

// gcc-8 -Wall -o signal signal.c


#include <signal.h>

int main()
{
raise(SIGTRAP);
return 0;
}




$ ./signal 
myverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglongfz
Trace/breakpoint trap (core dumped)
$
$ gdb -c core signal
GNU gdb (Ubuntu 8.1-0ubuntu3.2) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from signal...(no debugging symbols found)...done.
[New LWP 27437]
Core was generated by `./signal myverylonglonglongmyverylonglonglongmyverylonglonglongmyverylonglonglo'.
Program terminated with signal SIGTRAP, Trace/breakpoint trap.
#0 __GI_raise (sig=<optimised out>) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) q


             reply	other threads:[~2020-05-26 11:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 11:07 Jonny Grant [this message]
2020-05-26 14:09 ` Simon Marchi
2020-06-07 22:27   ` Jonny Grant
2020-06-11  2:32     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b86d8d4e-0ea6-7eae-16f8-2f3d8df5d6d8@jguk.org \
    --to=jg@jguk.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).