[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: remote debug
- From: Benoit Germain <bgermain@...>
- Date: Fri, 5 Jul 2002 09:47:56 +0200
I am currently experimenting with such a scheme (lua state + debug stub on
target platform, binding to a tcp socket opened by the server side).
What I do is store all relevant information in the host application, and the
debugger is only a display (i am concentrating on the debugger features, and
my display is a console for now). Everything is stored in a table created in
the state's registry, including breakpoints.
Those are in a separate table, where the key is a string formed from the
file name and the line number, and the value is a lua string. The line hook
fetches an entry in this table, if non-nil, evaluates the lua string, and
breaks if the result is non-nil.
Since I don't intend to have several dozens breakpoints when debugging, I
hope the memory penalty should remain reasonable. Not sure a table access at
every line will speed up things, though :-)
Well, I'm not done yet, but I see no reason why it would not work, unless
evaluating a lua string is not possible inside the line hook ?
> -----Original Message-----
> From: Tristan Rybak [mailto:firstname.lastname@example.org]
> Sent: jeudi 4 juillet 2002 21:19
> To: Multiple recipients of list
> Subject: remote debug
> I am thinking where to keep information about breakpoints
> during remote
> 1. send all breakpoint information to client debug stub -> for small
> embedded environments it has a big hit on memory...
> 2. keep all debug info in debugger -> big hit on performance
> because client
> must ask debugger every debug line what to do.
> What do You gurus think?