- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm encountering a problem in the idb debugger (version 12.0) where I cannot debug certain variables, which I'm presuming are reserved words to the debugger. In my program, I have a structure that has several thousand variables, one of which is a string array with the name "TYPE":
CHARACTER TYPE*7
When I try to examine this variable in the debugger, I get the following:
(idb) p OBJECT(1).TYPE
Unable to parse input as legal command or Fortran expression.
Is this a bug in idb or expected behavior?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
[fortran]program tobjThe problem occurs with the Windows version 10.1 of IDB in GUI mode, too.
implicit none
type objtyp
integer :: i
character(len=3) :: type
end type objtyp
type(objtyp) :: obj(5)
integer :: i
do i=1,5
obj(i)%i=6-i
obj(i)%type=char(64+i) // 'X' // char(70-i)
end do
write(*,10)(i,obj(i)%i,obj(i)%type,i=1,5)
10 format(1x,i2,2x,i3,2x,A)
end program tobj
[/fortran]
Place a breakpoint on the WRITE statement, run, and display obj(2). Works fine.
Then try obj(2)%type (debugger command: p obj(2)%type). Does not work.
Change the component name from type, which is a keyword, to typ. Recompile and display obj(2)%typ; works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Same instance as before, I have a large structure with hundreds of variables, the last of which is a character string defined as:
CHARACTER*32 ID
When you type "p OBJECT(1).ID", the debugger returns:
type = character*32
Expected return would be the contents of the character string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
my reproducer:
[fortran]program idbtest
implicit none
type debugthis
integer :: answer
character*7 :: type
character*11 :: normalname
real :: foo
end type debugthis
type ( debugthis ) myvar
myvar%answer = 42
myvar%type = "marvin"
myvar%normalname = "fordprefect"
myvar%foo = 3.1415
write(*,*) "The robot is ", myvar%type
end program idbtest[/fortran]
Setting the breakpoint at the WRITE, one can print myvar%normalname but not myvar%type. the IDB GUI can't display it either, expanding myvar fails to show %type but does show %normalname in expanded form.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This ID bug is unique enough that I doubt the fix for the first issue will fix this second issue.
Follow the ID discussion here http://software.intel.com/en-us/forums/showthread.php?t=82483
ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Any updates on this issue (DPD200169064)? I don't see any references to it in the release notes/fixes lists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is unlikely that this will ever be fixed in idb, since, as noted in the release notes, idb has been deprecated and will likely be removed in a future release.We are working to enhance gdb's Fortran support and suggest you use that instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
although IDB has been deprecated, this IS fixed in the enhanced gdb we ship with our compiler, 'gdb-ia'. Here is a screen session showing the fix:
$ gdb-ia No symbol table is loaded. Use the "file" command. GNU gdb (GDB) 7.7-8.0.524 Copyright (C) 2013 Free Software Foundation, Inc; (C) 2013-2014 Intel Corp. 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". Type "show configuration" for configuration details. For information about how to find Technical Support, Product Updates, User Forums, FAQs, tips and tricks, and other support information, please visit: <http://www.intel.com/software/products/support/>.For help, type "help". Type "apropos word" to search for commands related to "word". (gdb) file u270753 Reading symbols from u270753...done. (gdb) break 18 Breakpoint 1 at 0x402d20: file u270753.f90, line 18. (gdb) run Starting program: /site/jf/cts1/quad/rwgreen/forums/u270753/u270753 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". Breakpoint 1, idbtest () at u270753.f90:18 18 write(*,*) "The robot is ", myvar%type (gdb) print myvar%type $1 = 'marvin ' (gdb) quit A debugging session is active. Inferior 1 [process 56679] will be killed. Quit anyway? (y or n) y [rwgreen@dpdmic09 u270753]$ cat u270753.f90 program idbtest implicit none type debugthis integer :: answer character*7 :: type character*11 :: normalname real :: foo end type debugthis type ( debugthis ) myvar myvar%answer = 42 myvar%type = "marvin" myvar%normalname = "fordprefect" myvar%foo = 3.1415 write(*,*) "The robot is ", myvar%type end program idbtest

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page