Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Processing of convenience variables for scripts ...
@ 2002-12-06  8:30 Richard Sharpe
  2002-12-06  8:41 ` Daniel Jacobowitz
  0 siblings, 1 reply; 20+ messages in thread
From: Richard Sharpe @ 2002-12-06  8:30 UTC (permalink / raw)
  To: gdb

Hi,

In looking at this issue, it seems that much of the existing code that 
deals with variables is centered around printing:

   value_print (var->value, gdb_stdout, 0, Val_pretty_default);

While it seems that I could mess with providing new functions for a stream 
structure that I could retrieve strings from, is there a simpler way.

I envision something like 

  var1 = value_to_string (var->value);

And then construct a new command, and pass it through the standard routine 
that processes commands. 

However, it seems that things are not that simple :-)

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Processing of convenience variables for scripts ...
@ 2002-11-20  0:48 Richard Sharpe
  2002-11-20  6:13 ` Daniel Jacobowitz
  0 siblings, 1 reply; 20+ messages in thread
From: Richard Sharpe @ 2002-11-20  0:48 UTC (permalink / raw)
  To: gdb

Hi,

The following script does not seem to work:

define load-ko-syms
   path ./freebsd_46_i386/debug/export/kernel
   set $file = linker_files.tqh_first
   set $file = $file->link.tqe_next
   if ($file == 0)
        printf "No klds to load symbols for\n"
   else
        while ($file != 0)
                add-symbol-file $file->filename ($file->address + 
$file->text_offs)
                printf "Loaded symbols for %s\n", $file->filename
                set $file = $file->link.tqe_next
        end
   end
end

The loop works, but add-symbol-file seems to be called without the 
convenience variables being expanded.

Have it got that right?

If so, what would be the first step to get them expanded?

Regards
-----
Richard Sharpe, rsharpe[at]ns.aus.com, rsharpe[at]samba.org, 
sharpe[at]ethereal.com, http://www.richardsharpe.com


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

end of thread, other threads:[~2002-12-08 20:52 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-06  8:30 Processing of convenience variables for scripts Richard Sharpe
2002-12-06  8:41 ` Daniel Jacobowitz
2002-12-06  8:54   ` Fernando Nasser
2002-12-06 11:57     ` Richard Sharpe
2002-12-06 14:53       ` Fernando Nasser
2002-12-06 17:17         ` Daniel Jacobowitz
2002-12-07  8:50   ` Richard Sharpe
  -- strict thread matches above, loose matches on Subject: below --
2002-11-20  0:48 Richard Sharpe
2002-11-20  6:13 ` Daniel Jacobowitz
2002-11-20  8:32   ` Andrew Cagney
2002-11-20  8:36     ` Daniel Jacobowitz
2002-11-20  9:28       ` Richard Sharpe
2002-11-20 10:36         ` Daniel Jacobowitz
2002-11-20 21:40           ` Eli Zaretskii
2002-12-05 16:52           ` Fernando Nasser
2002-12-08 11:36           ` Doug Evans
2002-12-08 12:30             ` Daniel Jacobowitz
2002-12-08 12:52               ` Doug Evans
2002-12-08 11:16   ` Doug Evans
2002-12-08 11:31     ` Richard Sharpe

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