Thursday 15 August 2013

How do I test my $HOME environment variable in a gdb init script? -


I know that I set the 'set $ foo = EXPR' to set the feature variable for the expression result in gdb I can say, and I can say 'show anna home' to display my $ HOME environment variable, but how can I capture my $ HOME value in $ HO $$?

I have to set up different variables on my variables, but I can not understand how it is.

There are two ways to do this.

The easiest way to do this is to use Python Scripting. In Python you have many features, including environment variables.

If you do not have Python - upgrade your GDB! But if you can not do this, then there is still an approach you can use. You can use the set logging or shell to print the files in a file, then rewrite the file (again shell By using) for valid gdb scripts, and finally source resultant file.


No comments:

Post a Comment