Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 Discussions

Break command error message in intel debugger for linux

cassielinux
Beginner
701 Views
Hi
I am sorry if I post the question at the wrong place. Please let me know where is more appropriate for me to ask.

I am new to the idb/gdb debugger.I am trying to set a breakpoint in a fortran function called set_time_i which is in a file called time_manager.F90 by using idb. When I ran the executable file, I got error message such as

"Program received signal SIGFPE
TIME_MANAGER_MOD::set_time_i (set_time_i= (...), seconds=0, days=0, ticks=, err_msg=(...), .tmp.ERR_MSG.len_V$14b=0) at time_manager.F90:313"
So I tried to debug the error by setting breakpoint to the set_time_i.

However, idb keeps giving me error message and stops me from setting hte breakpoint. May I know if I did something wrong ? I tried all these commands:

1) (idb) break time_manager.F90:set_time_i

2) (idb) break time_manager:set_time_i

3) (idb) break set_time_i

4) (idb) break time_manager_:set_time_i_

The error message is

" break time_manager:set_time_i ^ Unable to parse input as legal command or Fortran expression."

None of above work. Did I miss something when I use it ? Thanks

0 Kudos
1 Solution
TimP
Honored Contributor III
701 Views
This is the right place to ask.
I would suggest running nm on the .o file for the compilation of set_time_i to find the exact spelling of the break point name.

View solution in original post

0 Kudos
3 Replies
TimP
Honored Contributor III
702 Views
This is the right place to ask.
I would suggest running nm on the .o file for the compilation of set_time_i to find the exact spelling of the break point name.
0 Kudos
cassielinux
Beginner
701 Views
Thanks for replying.
So I typed shell> nm time_manager.o and it shows:

".............................................
0000000000004d12 T time_manager_mod_mp_set_time_i_
........................................

Then, I typed shell> break time_manager_mod_mp_set_time_i_ and it worked ! What I do not understand is why the break point name is different from the function name ? Time_manager.F90 has been used as a module. Is this why that when the compiler generates the object files, it won't generate the object symbol as its function but a xxx_mod_mp_yyy name ? Does this only happen to Fortran ? I just do not understand where the part "..._mod_mp_" comes from.

Thank you very much,
0 Kudos
Georg_Z_Intel
Employee
701 Views
Hello,

the "_mp_" infix is required by FORTRAN name mangling: module & function symbols are concatenated by inserting this separator in between.

IDB does this for you if you use the "." separator, e.g.:

(idb) break module.function

Hope that makes it easier for you.

Best regards,

Georg Zitzlsberger
0 Kudos
Reply