- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
with multiple file as subroutine compiled with make, how can i set a breakpoint in some point? suppose, i want to find value of argument A on a subroutine S ....its easy if there is a single source code....but what if each subprogram is written as a seperate file?
I have gone through the intel's manual....so its not RTFM....may be U(nderstand)TFM?
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Plz reply the post...even if it quite idiotic.....i am really stuck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can set a break point in the subroutine using the subroutine's name. See the example below and the "br sub1" command.
[bash]$ cat -n sample1.f90
1 program sample
2 integer i
3 call sub1(i)
4 end
$ cat -n sub1.f90
1 subroutine sub1(i)
2 integer i
3 print *,"i = ",i
4 end
$ ifort -V -c -g sub1.f90
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100203 Package ID: l_cprof_p_11.1.069
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Fortran 11.1-2692
$ ifort -V -g sample1.f90 sub1.o
Intel Fortran Intel 64 Compiler Professional for applications running on Intel 64, Version 11.1 Build 20100203 Package ID: l_cprof_p_11.1.069
Copyright (C) 1985-2010 Intel Corporation. All rights reserved.
Intel Fortran 11.1-2692
GNU ld version 2.17.50.0.6-5.el5 20061020
$ idbc a.out
Intel Debugger for applications running on Intel 64, Version 11.1, Build [1.2097.2.333]
------------------
object file name: a.out
Reading symbols from /tmp/a.out...done.
(idb) br sub1
Breakpoint 1 at 0x402b1c: file /tmp/sub1.f90, line 3.
(idb) r
[New Thread 46912496306752 (LWP 18883)]
[New Thread 46912496306752 (LWP 18883)]
Starting program: /tmp/a.out
Breakpoint 1, sub1 (i=0) at /tmp/sub1.f90:3
3 print *,"i = ",i
(idb) list
1 subroutine sub1(i)
2 integer i
3 print *,"i = ",i
4 end
(idb)
[/bash]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The point is that you can stop at subroutine entry, then set an internal break point, without reference a priori to the location of the source code. The debug-enabled code has a record of where the source was at compile time. If you have moved the source, the debugger should open a pop-up asking you to browse for it.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page