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

How to set an initialization file for idb?

woshiwuxin
Novice
707 Views
Hi, I'm using idb with gui in Linux. I create a ~./idbrc file with some variable settings for idb. However, after I launch idb and then use the "print" command to print variables that are set in ~/.idbrc, it doesn't work.I guess the default option turns GDB mode on.
My question is which file is used to initialize the idb variables, and how can I do that?
P.S. An example of my .idbrc file is
set $maxarrlen = 500
thanks in advance!
0 Kudos
1 Solution
Hubert_H_Intel
Employee
707 Views
Since 11.0 version of the Intel IDB Debugger, the command line version (idbc) as well as the GUI version (idb) are running in GDB mode by default. So you should use the .gdbinit startup file only. In case you needtorun the debugger in the compatibily modes -idb or -dbx, you need touse.idbrc asstartup file.
Does this help?
Regards, Hubert.

View solution in original post

0 Kudos
5 Replies
TimP
Honored Contributor III
707 Views
If you want gdb mode, I suppose you require (since compiler version 11.0)
idbc -gdb ......
I see that .idbrc is described in the help file, but the help file for compiler version 11.1 and later doesn't appear fully up to date. I submitted a question on this on premier.intel.com issue 601980 .

Why are you quoting a MacOS if you are running linux?
0 Kudos
woshiwuxin
Novice
707 Views
First, to my problem. I want to set a variable for idb an arbitrary value, i.e. $maxarrlen = 300 (the default is 1024). And I also want this setting to be ready automatically after I launch idb. I wrote the following in .idbrc
set $maxarrlen = 300
However, this does not work unless I append the command 'idb' with an argument '-dbx'. I want to be in GDB mode, and also have this setting in .idbrc be ready after I run idb. But I don't know how to do that :(
Second, that's just my signature.My mobile buddy is a Mac, and my real weapon is a workstation running Linux. I really like working in a Linux environment, but for one thing, I can not be always with a workstation when I have some ideas. For another, all my favorite games just do not support Linux. So Mac seems to be a good substitute. That's just my personal option.
0 Kudos
woshiwuxin
Novice
707 Views
To be specified, see the following output:
[plain]xwu@debian:~$ cat .idbrc 
set $maxarrlen = 300
xwu@debian:~$ idbc
Intel Debugger for applications running on Intel 64, Version 11.1, Build [1.2097.2.344]
(idb) print $maxarrlen
$1 = 1024
(idb) quit
xwu@debian:~$ idbc -dbx
Intel Debugger for applications running on Intel 64, Version 11.1, Build [1.2097.2.344]
(idb) print $maxarrlen
300
(idb) quit
xwu@debian:~$ 
[/plain]
0 Kudos
Hubert_H_Intel
Employee
708 Views
Since 11.0 version of the Intel IDB Debugger, the command line version (idbc) as well as the GUI version (idb) are running in GDB mode by default. So you should use the .gdbinit startup file only. In case you needtorun the debugger in the compatibily modes -idb or -dbx, you need touse.idbrc asstartup file.
Does this help?
Regards, Hubert.
0 Kudos
woshiwuxin
Novice
707 Views
Thank you, Hubert!
This helps a lot!
0 Kudos
Reply