Re: parse_expression
"Morgan Howe" <[email protected]> Fri, 1 Jun 2007 08:39:49 -0400
| Newsgroups | gmane.os.openbeos.kernel.devel |
|---|---|
| Message-ID | <[email protected]> |
On 5/28/07, Axel Dörfler <[email protected]> wrote: > Ingo Weinhold <bonefish-CFLBMwTPW48UNGrzBIF7/[email protected]> wrote: > > > But if you had put [%eip = 0x12345] at the command line, the > > > debugger > > > would have called parse_expression() directly. > > So what you're saying is, if the input line starts with "[" the > > debugger > > evaluates the whole line as an expression, otherwise it must start > > with a > > command name and the command parses it's arguments as needed, right? > > That should more or less be it; even though I wouldn't mind if the '[' > is optional, and only necessary when the expression would be ambiguous. > > > BTW, I think, the "[...]" blocks have to be scanned by the debugger > > at any > > rate, so that e.g. "db [lastAddress + 10] 20" passes just two > > arguments to > > the db command ("[lastAddress + 10]" and "20"). > > That would at least be helpful, indeed - it could be done in the same > way as for quotes, I think. > > > I suppose it would be powered by architecture specific functions > > like: > > > > bool arch_set_iframe_register(struct thread* thread, int > > iframeNumber, > > const char* registerName, int64 value); > > bool arch_get_iframe_register(struct thread* thread, int > > iframeNumber, > > const char* registerName, int64* value); > > > > The bool result may as well be a status_t, though the only error I > > can > > imagine at the moment is that the register name is invalid, > > respectively > > the register not included in the iframe. Sorry, a little slow to get back -- long weekend. ;) At any rate, that all sounds good. I will probably try and get started this weekend, so I will probably have some questions then. Morgan ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/