user functions and tracepoint actions

David Taylor <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
User functions and tracepoint actions do not 'play well together'.

Suppose you want to write something like:

    define user_func
        trace some_function
        actions
            collect some_variable
            collect something_else
        end
        <some other GDB commands>
    end

This will not work as the 'define' command does not recognize that the
'actions' command is terminated with an 'end'.

When the first 'end' is seen, it terminates the 'define' command.

Aside: part of my motivation for the above is an attempt to 'automate'
at least part of the testing of our GDB stub.  Currently, big sigh, it
is 100% manual.  It is difficult to download programs, ruling out (for
now) the standard GDB testsuite.  But, there is an operating system on
the machine with a GDB stub that supports a bunch of standard GDB remote
protocol stuff including tracepoints and some vendor specific
extensions.

I actually want to define an entire trace experiment and execute it in
the user function.

What I'm having to resort to is to put the trace and actions commands as
top level commands in a separate file and then have the user function
source it and then run the experiment.  Ugly.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.