* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
@ 2010-02-25 11:32 ` mgrojo at indra dot es
2010-07-07 23:09 ` rtaylor at synopsys dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mgrojo at indra dot es @ 2010-02-25 11:32 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From mgrojo at indra dot es 2010-02-25 11:32 -------
The backtrace of the gdb core is:
#0 0x000000347732e25d in raise () from /lib64/tls/libc.so.6
#1 0x000000347732fa5e in abort () from /lib64/tls/libc.so.6
#2 0x000000000045128b in internal_vproblem (problem=0x8d92c0,
file=0x6a19e0 "stack.c", line=289,
fmt=0x5bf5120 "stack.c:289: internal-error: print_frame_args: Assertion
`nsym != NULL' failed.\nA problem internal to GDB has been detected,\nfurther
debugging may prove unreliable.", ap=0x1) at utils.c:979
#3 0x0000000000451549 in internal_verror (
file=0x15b0 <Address 0x15b0 out of bounds>, line=6,
fmt=0xffffffffffffffff <Address 0xffffffffffffffff out of bounds>, ap=0x6)
at utils.c:994
#4 0x00000000004515e1 in internal_error (
file=0x15b0 <Address 0x15b0 out of bounds>, line=5552,
string=0x6 <Address 0x6 out of bounds>) at utils.c:1003
#5 0x000000000050828f in print_frame_args (func=<value optimized out>,
frame=0x5772068, num=-1, stream=0x9cb620) at stack.c:289
#6 0x000000000050984e in frame_info (addr_exp=<value optimized out>,
from_tty=<value optimized out>) at stack.c:1149
#7 0x000000000044e1c5 in execute_command (p=0xaab591 "", from_tty=1)
at top.c:453
#8 0x0000000000513e32 in command_handler (command=0xaab587 "info frame")
at event-top.c:511
#9 0x000000000051417b in command_line_handler (rl=0x4e0ec50 "\260b\226")
at event-top.c:742
#10 0x00000000005c7813 in rl_callback_read_char () at callback.c:205
#11 0x0000000000513769 in rl_callback_read_char_wrapper (client_data=0x15b0)
at event-top.c:178
#12 0x00000000005124d9 in process_event () at event-loop.c:394
#13 0x000000000051338f in gdb_do_one_event (data=<value optimized out>)
at event-loop.c:447
#14 0x000000000050e07b in catch_errors (func=0x513340 <gdb_do_one_event>,
func_args=0x0, errstring=0x67269d "", mask=<value optimized out>)
at exceptions.c:510
#15 0x00000000004aa07a in tui_command_loop (data=<value optimized out>)
at ./tui/tui-interp.c:153
#16 0x00000000004470b9 in captured_command_loop (data=0x15b0) at ./main.c:226
#17 0x000000000050e07b in catch_errors (func=0x4470b0 <captured_command_loop>,
func_args=0x0, errstring=0x67269d "", mask=<value optimized out>)
at exceptions.c:510
#18 0x0000000000447706 in captured_main (data=<value optimized out>)
at ./main.c:902
#19 0x000000000050e07b in catch_errors (func=0x4470f0 <captured_main>,
func_args=0x7fbffff5e0, errstring=0x67269d "", mask=<value optimized out>)
at exceptions.c:510
#20 0x0000000000447fd4 in gdb_main (args=0x15b0) at ./main.c:911
#21 0x0000000000446e87 in main (argc=6, argv=0x15b0) at gdb.c:33
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
2010-02-25 11:32 ` [Bug backtrace/11313] " mgrojo at indra dot es
@ 2010-07-07 23:09 ` rtaylor at synopsys dot com
2010-07-07 23:14 ` rtaylor at synopsys dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rtaylor at synopsys dot com @ 2010-07-07 23:09 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From rtaylor at synopsys dot com 2010-07-07 23:09 -------
Created an attachment (id=4875)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=4875&action=view)
tar file contains a small test case that demonstrates gdb asssert failure
I see a very similar problem to the one reported. I have a very small test
program that demonstrates the issue. The attached tar file contains the program
source (tt2.f), a makefile used to compile the executable, the executable
(ifort) that causes the gdb assert failure, and lastly the gdb stack trace from
the gdb core file. This problem occurs with both gdb 6.8 and gdb 7.1. Also
the same executable (ifort) can be debugged with the TotalView debugger without
any problem. If the gdb core file (7.9 MB) is needed it could be provided.
Randy Taylor
Staff Engineer
Synopsys
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
2010-02-25 11:32 ` [Bug backtrace/11313] " mgrojo at indra dot es
2010-07-07 23:09 ` rtaylor at synopsys dot com
@ 2010-07-07 23:14 ` rtaylor at synopsys dot com
2010-07-07 23:50 ` rtaylor at synopsys dot com
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rtaylor at synopsys dot com @ 2010-07-07 23:14 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Version|7.0 |7.1
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
` (2 preceding siblings ...)
2010-07-07 23:14 ` rtaylor at synopsys dot com
@ 2010-07-07 23:50 ` rtaylor at synopsys dot com
2010-07-13 19:02 ` rtaylor at synopsys dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rtaylor at synopsys dot com @ 2010-07-07 23:50 UTC (permalink / raw)
To: gdb-prs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |rtaylor at synopsys dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
` (3 preceding siblings ...)
2010-07-07 23:50 ` rtaylor at synopsys dot com
@ 2010-07-13 19:02 ` rtaylor at synopsys dot com
2010-07-16 16:47 ` tromey at redhat dot com
2010-07-16 21:55 ` rtaylor at synopsys dot com
6 siblings, 0 replies; 8+ messages in thread
From: rtaylor at synopsys dot com @ 2010-07-13 19:02 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From rtaylor at synopsys dot com 2010-07-13 19:02 -------
Can this bug be assigned to someone to evaluate?
The test case that I've uploaded should make it fairly straight forward to
evaluate the difficulty of a fix.
Randy Taylor
Staff Engineer
Synopsys Inc.
--
What |Removed |Added
----------------------------------------------------------------------------
Priority|P2 |P1
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
` (4 preceding siblings ...)
2010-07-13 19:02 ` rtaylor at synopsys dot com
@ 2010-07-16 16:47 ` tromey at redhat dot com
2010-07-16 21:55 ` rtaylor at synopsys dot com
6 siblings, 0 replies; 8+ messages in thread
From: tromey at redhat dot com @ 2010-07-16 16:47 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From tromey at redhat dot com 2010-07-16 16:47 -------
The problem here has to do with case-sensitivity.
lookup_symbol_in_language downcases the symbol name.
However, the DWARF reader doesn't do this, so the
symbol is then not found. So, the assertion in stack.c
triggers.
In the long term the best thing to do would be to clean up this area.
See PR 11560.
In the short term it seems reasonable to me to just remove this assert.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug backtrace/11313] internal-error: print_frame_args: Assertion `nsym != NULL' failed
2010-02-23 12:01 [Bug backtrace/11313] New: internal-error: print_frame_args: Assertion `nsym != NULL' failed mgrojo at indra dot es
` (5 preceding siblings ...)
2010-07-16 16:47 ` tromey at redhat dot com
@ 2010-07-16 21:55 ` rtaylor at synopsys dot com
6 siblings, 0 replies; 8+ messages in thread
From: rtaylor at synopsys dot com @ 2010-07-16 21:55 UTC (permalink / raw)
To: gdb-prs
------- Additional Comments From rtaylor at synopsys dot com 2010-07-16 21:55 -------
tromey,
Thanks for taking a look at this and the suggestion to bypass the assert.
If I remove the assert via the simple code change below. (I am using the most
recent 7.2.50.20100716 code base) I see that I no longer get the assert as
expected. The "bt" command and "p str1" commands do not go through the assert
mechanism but they do not give the value of the str1 parameter either. The
output I see is below. I've read over PR 11560 and but not being so familiar
with gdb internals I do not fully understand the commentary there. Is there a
better way to implement this so that the command "p str1" can actually look up
the symbol and print it's value? Our product is using ifort to compile
the .o's and then g++ to link edit the executable. Intel's idbc and TotalView
both can print the local varaible str1 when the break point is set in the
test_func routine.
Thanks again for your help,
Randy Taylor
Staff Sofware Engineer
Synopsys Inc.
-----------------------------------------------------------
/remote/sde106/rtaylor/gdb/gdb-7.2.50.20100716/gdb/gdb ifort
GNU gdb (GDB) 7.2.50.20100716
Copyright (C) 2010 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-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /remote/srm226/rtaylor/rtaylor_tc/tt1_fort/ifort...done.
(gdb) break test_func
Breakpoint 1 at 0x8049c1a: file tt2.f, line 6.
(gdb) run
Starting program: /remote/srm226/rtaylor/rtaylor_tc/tt1_fort/ifort
Breakpoint 1, test_func (str1=..., .tmp.STR1.len_V$8=16) at tt2.f:6
6 str1 = ' '
(gdb) bt
#0 test_func (str1=..., .tmp.STR1.len_V$8=16) at tt2.f:6
#1 0x08049ce6 in tt1 () at tt2.f:14
#2 0x080630e3 in main ()
(gdb) p str1
$1 = (REF TO -> ( character*16 )) @0x0: <error reading variable>
(gdb)
diff -c stack.c.orig stack.c
*** stack.c.orig Thu Jul 1 08:36:17 2010
--- stack.c Fri Jul 16 14:09:36 2010
***************
*** 290,296 ****
nsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
b, VAR_DOMAIN, NULL);
! gdb_assert (nsym != NULL);
if (SYMBOL_CLASS (nsym) == LOC_REGISTER
&& !SYMBOL_IS_ARGUMENT (nsym))
{
--- 290,296 ----
nsym = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
b, VAR_DOMAIN, NULL);
! if (nsym) {
if (SYMBOL_CLASS (nsym) == LOC_REGISTER
&& !SYMBOL_IS_ARGUMENT (nsym))
{
***************
*** 334,339 ****
--- 334,340 ----
else
sym = nsym;
}
+ }
/* Print the current arg. */
if (!first)
--
http://sourceware.org/bugzilla/show_bug.cgi?id=11313
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 8+ messages in thread