Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* command api question
@ 2002-04-02 10:50 Kris Warkentin
  2002-04-02 10:55 ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Kris Warkentin @ 2002-04-02 10:50 UTC (permalink / raw)
  To: gdb

There is a static variable 'solib_search_path' in solib.c that I'd like to
get access to outside of solib.c.  I see that it has been added to the
command list with an 'add_set_cmd()' call.  What is the easiest way for me
to get a reference to this variable so that I can modify it? (we have an
initialization routine to set a default solib search path).  I apologize if
this is clearly documented somewhere - the functions in command.h are
probably what I'm looking for but it wasn't immediately obvious which one I
should use and how.

cheers,

Kris


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-02 10:50 command api question Kris Warkentin
@ 2002-04-02 10:55 ` Daniel Jacobowitz
  2002-04-02 11:22   ` Kris Warkentin
  2002-04-03  8:54   ` Andrew Cagney
  0 siblings, 2 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-02 10:55 UTC (permalink / raw)
  To: Kris Warkentin; +Cc: gdb

On Tue, Apr 02, 2002 at 01:51:16PM -0500, Kris Warkentin wrote:
> There is a static variable 'solib_search_path' in solib.c that I'd like to
> get access to outside of solib.c.  I see that it has been added to the
> command list with an 'add_set_cmd()' call.  What is the easiest way for me
> to get a reference to this variable so that I can modify it? (we have an
> initialization routine to set a default solib search path).  I apologize if
> this is clearly documented somewhere - the functions in command.h are
> probably what I'm looking for but it wasn't immediately obvious which one I
> should use and how.

It's probably easier just to make it into a global, instead of munging
the command lists.

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-02 10:55 ` Daniel Jacobowitz
@ 2002-04-02 11:22   ` Kris Warkentin
  2002-04-02 11:25     ` Daniel Jacobowitz
  2002-04-03  8:54   ` Andrew Cagney
  1 sibling, 1 reply; 8+ messages in thread
From: Kris Warkentin @ 2002-04-02 11:22 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Is that an agreeable solution?  Or would it be better to just provide
get/set functions?  We're hoping to get our changes rolled into the gdb head
branch someday and we want to keep things as clean as possible. (ie. as few
changes as possible to common files, most stuff implemented in separate qnx
files).

cheers,

Kris
----- Original Message -----
From: "Daniel Jacobowitz" <drow@mvista.com>
To: "Kris Warkentin" <kewarken@qnx.com>
Cc: <gdb@sources.redhat.com>
Sent: Tuesday, April 02, 2002 1:55 PM
Subject: Re: command api question


> On Tue, Apr 02, 2002 at 01:51:16PM -0500, Kris Warkentin wrote:
> > There is a static variable 'solib_search_path' in solib.c that I'd like
to
> > get access to outside of solib.c.  I see that it has been added to the
> > command list with an 'add_set_cmd()' call.  What is the easiest way for
me
> > to get a reference to this variable so that I can modify it? (we have an
> > initialization routine to set a default solib search path).  I apologize
if
> > this is clearly documented somewhere - the functions in command.h are
> > probably what I'm looking for but it wasn't immediately obvious which
one I
> > should use and how.
>
> It's probably easier just to make it into a global, instead of munging
> the command lists.
>
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-02 11:22   ` Kris Warkentin
@ 2002-04-02 11:25     ` Daniel Jacobowitz
  2002-04-02 12:19       ` Kris Warkentin
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-02 11:25 UTC (permalink / raw)
  To: Kris Warkentin; +Cc: gdb

On Tue, Apr 02, 2002 at 02:22:36PM -0500, Kris Warkentin wrote:
> Is that an agreeable solution?  Or would it be better to just provide
> get/set functions?  We're hoping to get our changes rolled into the gdb head
> branch someday and we want to keep things as clean as possible. (ie. as few
> changes as possible to common files, most stuff implemented in separate qnx
> files).

Well, I also have a solib search path patch that I'd like to get rolled
in.  It's not in an appropriate form right now though.  And I think
there was a third in the list archives over a year ago, that met with
some opposition.

I'd really like to see the search path become (at least) compile-time
default configurable...

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-02 11:25     ` Daniel Jacobowitz
@ 2002-04-02 12:19       ` Kris Warkentin
  2002-04-02 12:24         ` Daniel Jacobowitz
  0 siblings, 1 reply; 8+ messages in thread
From: Kris Warkentin @ 2002-04-02 12:19 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb

Well, maybe if there were a generic method to get/set variables in the
command api.  It's possible to do the following from the prompt:

(gdb) set solib-search-path /some/path
or
(gdb) show solib-search-path

so if there were an easy programmatic way of doing this, then we wouldn't
have to worry about compile time defines.

cheers,

Kris

----- Original Message -----
From: "Daniel Jacobowitz" <drow@mvista.com>
To: "Kris Warkentin" <kewarken@qnx.com>
Cc: <gdb@sources.redhat.com>
Sent: Tuesday, April 02, 2002 2:25 PM
Subject: Re: command api question


> On Tue, Apr 02, 2002 at 02:22:36PM -0500, Kris Warkentin wrote:
> > Is that an agreeable solution?  Or would it be better to just provide
> > get/set functions?  We're hoping to get our changes rolled into the gdb
head
> > branch someday and we want to keep things as clean as possible. (ie. as
few
> > changes as possible to common files, most stuff implemented in separate
qnx
> > files).
>
> Well, I also have a solib search path patch that I'd like to get rolled
> in.  It's not in an appropriate form right now though.  And I think
> there was a third in the list archives over a year ago, that met with
> some opposition.
>
> I'd really like to see the search path become (at least) compile-time
> default configurable...
>
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-02 12:19       ` Kris Warkentin
@ 2002-04-02 12:24         ` Daniel Jacobowitz
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel Jacobowitz @ 2002-04-02 12:24 UTC (permalink / raw)
  To: gdb

On Tue, Apr 02, 2002 at 03:20:04PM -0500, Kris Warkentin wrote:
> Well, maybe if there were a generic method to get/set variables in the
> command api.  It's possible to do the following from the prompt:
> 
> (gdb) set solib-search-path /some/path
> or
> (gdb) show solib-search-path
> 
> so if there were an easy programmatic way of doing this, then we wouldn't
> have to worry about compile time defines.

Sorry, what I meant was "_configure_ time configurable".  I like being
able to set the default to point at our cross development
environment...

-- 
Daniel Jacobowitz                           Carnegie Mellon University
MontaVista Software                         Debian GNU/Linux Developer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-02 10:55 ` Daniel Jacobowitz
  2002-04-02 11:22   ` Kris Warkentin
@ 2002-04-03  8:54   ` Andrew Cagney
  2002-04-03  9:06     ` Kris Warkentin
  1 sibling, 1 reply; 8+ messages in thread
From: Andrew Cagney @ 2002-04-03  8:54 UTC (permalink / raw)
  To: Daniel Jacobowitz, Kris Warkentin; +Cc: gdb

> On Tue, Apr 02, 2002 at 01:51:16PM -0500, Kris Warkentin wrote:
> 
>> There is a static variable 'solib_search_path' in solib.c that I'd like to
>> get access to outside of solib.c.  I see that it has been added to the
>> command list with an 'add_set_cmd()' call.  What is the easiest way for me
>> to get a reference to this variable so that I can modify it? (we have an
>> initialization routine to set a default solib search path).  I apologize if
>> this is clearly documented somewhere - the functions in command.h are
>> probably what I'm looking for but it wasn't immediately obvious which one I
>> should use and how.
> 
> 
> It's probably easier just to make it into a global, instead of munging
> the command lists.

Er .....

Kris, can you explain why you want to munge this variable?

Andrew


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: command api question
  2002-04-03  8:54   ` Andrew Cagney
@ 2002-04-03  9:06     ` Kris Warkentin
  0 siblings, 0 replies; 8+ messages in thread
From: Kris Warkentin @ 2002-04-03  9:06 UTC (permalink / raw)
  To: Andrew Cagney, Daniel Jacobowitz; +Cc: gdb

----- Original Message -----
From: "Andrew Cagney" <ac131313@cygnus.com>
To: "Daniel Jacobowitz" <drow@mvista.com>; "Kris Warkentin"
<kewarken@qnx.com>
Cc: <gdb@sources.redhat.com>
Sent: Wednesday, April 03, 2002 11:54 AM
Subject: Re: command api question


> Er .....
>
> Kris, can you explain why you want to munge this variable?
>
> Andrew
>

Well, we're bringing our very old gdb 4.17 port up to date with the current
head branch of gdb for eventual submission to the FSF.  The code I'm looking
at initializes solib_search_path to a bunch of our library directories.
Considering that solib_open search $PATH and $LD_LIBRARY_PATH, it's probably
unecessary...I should probably lean more to smart porting rather than
mindless porting eh? ;-)

Kris


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-03 17:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-02 10:50 command api question Kris Warkentin
2002-04-02 10:55 ` Daniel Jacobowitz
2002-04-02 11:22   ` Kris Warkentin
2002-04-02 11:25     ` Daniel Jacobowitz
2002-04-02 12:19       ` Kris Warkentin
2002-04-02 12:24         ` Daniel Jacobowitz
2002-04-03  8:54   ` Andrew Cagney
2002-04-03  9:06     ` Kris Warkentin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox