This is the mail archive of the
mailing list for the GDB project.
Re: cannot get autoload to work
- From: Borislav Kapukaranov <b dot kapukaranov at gmail dot com>
- To: "Abid, Hafiz" <Hafiz_Abid at mentor dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 7 Nov 2013 12:54:01 +0200
- Subject: Re: cannot get autoload to work
- References: <CAGE-agH2wvBz0f6tADEf_7ya2bqh6F26DAPAB949=FZvwifQUw at mail dot gmail dot com> <EB3B29AD43CA924DA27099BC85192376E0736D6D at EU-MBX-02 dot mgc dot mentorg dot com>
Thanks for the reply. I was actually trying to auto-load mozilla
spidermonkey's pretty printers. Putting them in the current dir did
help in finding the scripts but did not load them in gdb.
Anyway I managed to get them running with a combination of gdbinit
python syspath includes and a libmozjs-gdb.py script that actually
triggered enabling the pretty printers.
On Thu, Nov 7, 2013 at 12:41 PM, Abid, Hafiz <Hafiz_Abid@mentor.com> wrote:
>> -----Original Message-----
>> From: firstname.lastname@example.org [mailto:email@example.com] On
>> Behalf Of Borislav Kapukaranov
>> Sent: 06 November 2013 18:33
>> To: firstname.lastname@example.org
>> Subject: cannot get autoload to work
>> I'm trying to get autoloading to work with gdb 7.6.1. From the
>> documentation I gather there are two ways to plug in autoloading
>> - using objfile-gdb.py files
>> - or using the DEFINE_GDB_SCRIPT macro
> I tried both ways on latest GDB from git and it seems to work for me.
> For DEFINE_GDB_SCRIPT macro, If the specified file without any path like
> DEFINE_GDB_SCRIPT ("test.py")
> then it needs to be in the current directory. This is the directory which you
> get from 'pwd' on the terminal.
> You can also specify a path in this macro and then gdb will look for the file
> on that path. You will also have to add the folder where this file is
> in the auto-load safe-path.
>> I can't seem to get any of them working. I have a bunch of spidermonkey
>> pretty printers that seem to be built with autoloading in mind. Since there
>> weren't any objfile-gdb.py style printers I tried with the macro.
>> The docu says "gdb will look for each specified script file first in the current
>> Which is the current dir in this case? - the dir where I start gdb, or the one
>> with the executable or what?
>> Can you point me to examples of both approaches so that I can be able to
>> auto-load pretty printers for my own types?