- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I recently installed gdb ( and ifort ( Version 19.0 Build 20190416 ) and have been debugging a large code that has a lot of Fortran modules. In a sample module named "laser_mod", I am able to examine real variables, e.g.,
(gdb) print laser_mod::omg0
$7 = 0.025125017310528065
However, if I attempt to examine an (truly variable) integer or logical variable, I get the following:
(gdb) print laser_mod::iseed
No symbol "laser_mod::iseed" in current context.
(gdb) print laser_mod::l_mult_pol_emit
No symbol "laser_mod::l_mult_pol_emit" in current context.
If i run nm on the executable, I find reals seem to be "data" whereas integers and logicals has type "S" which according to the man page for "nm" is a symbol not contained in other sections such as data or text or absolute, etc. (i.e., a "beats me" location ...)
macmini-4265[522]>nm xgingerh | grep omg0
000000010055f750 D _laser_mod_mp_omg0_
macmini-4265[523]>nm xgingerh | grep iseed
00000001006fccf0 S _laser_mod_mp_iseed_
macmini-4265[524]>nm xgingerh | grep l_mult_pol_emit
00000001006fcde8 S _laser_mod_mp_l_mult_pol_emit_
So, given the gdb manual does not seem to give any obvious information on what to do, I am hoping wise F95&gdb pundits out there can advise me as to how to get at module integer and logical variables from gdb. In seaching this and other forums, I did not see any relevant posts on this topic in the last few years.
Thanks in advance.
Link Copied
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page