On Mon, May 14, 2012 at 4:59 PM, Abhijit Halder wrote: > ---------- Forwarded message ---------- > From: Abhijit Halder > Date: Mon, May 14, 2012 at 4:45 PM > Subject: [PATCH] Implementation of plugin command to support custom > GDB extensions at runtime > To: "gdb-patches@sourceware.org ml" > > > Though in the last couple of discussions we agreed upon not trying to > push this idea into mainstream GDB, I am still uploading this patch as > I have found this useful for someone who tries to get some useful > patch-work done already but not readily available in the releases. I > beg pardon to people in this community. People in the community may > safely ignore this patch at their own will. > > This patch implements a new gdb command namely, "plugin" to add and > delete custom gdb extensions at runtime. Plugins are shared libraries > supported by native OS. > > Following new commands are added: > > 1. plugin (Without any argument this will list down existing GDB > plugins and with a plugin name as argument, will list down all new > commands introduced by the plugin) > 2. plugin add (Will add a plugin specified by a relative or > full path name of a shared library . e.g. /usr/lib/gdb-ext.so) > 3. plugin del (Will delete an already added plugin specified > by a relative or full path name of a shared library ) > > Plugin developer has to write his/her own plugin constructor and > destructor routine of a given prototype to export a set of commands > s/he wants to add in gdb command list. After adding a plugin the user > will be able to use the new set of commands introduced by the plugin > in gdb prompt. There is a similar (same ?) proposal sometime back by Scott Moser. http://sourceware.org/ml/gdb/2002-04/msg00371.html Thanks, Abhijit Halder