poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Feature request: open file before running poke script


From: David Faust
Subject: Feature request: open file before running poke script
Date: Fri, 5 Feb 2021 12:16:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

Hi!

First, thank you all for developing such a great tool! I am using poke
to debug some work I am doing with BTF and it is wonderfully useful :)

One thing I have found that would be very convenient is the ability to
open a specified file before running a script, when invoking poke with
-s or --script=<script>

For example, when invoked as
  $ poke -s myscript foo.o

Poke would execute:
  .file foo.o
  <all commands in myscript; which can do something with foo.o>

As a motivating use case, I currently have a small poke script which
collects BTF information in a file, and displays portions of it. But
right now, I need to hardcode the filename (foo.o) into the script.
Otherwise, the following happens:

  $ poke -s myscript foo.o
  unhandled no IOS exception
  $ poke foo.o --script=myscript
  unhandled no IOS exception

With this improvement, it would be much easier to rapidly check multiple
test cases:

  $ poke -s myscript foo.o
  (dump of relevant information in foo.o)
  $ poke -s myscript bar.o
  (dump of relevant information in bar.o)
  ...

Or maybe there is an existing way to do this, in which case the
documentation around poke script usage could perhaps be improved?

Thanks!
David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]