Commit graph

42 commits

Author SHA1 Message Date
Bill Currie
c6aa061229 [qwaq] Fetch Ruamoko progs locals from the stack frame
Now that the data is fetched from the correct location, the locals view
is useful again :). However, there seems to be a problem with array
views: not sure they're showing the correct data as I was getting
unexpected values in the display but normal vars seem to be ok.
2022-02-12 10:19:45 +09:00
Bill Currie
39583a959e [qwaq] Show only user local defs
While the .tmp defs weren't too much clutter in v6p progs, the .arg defs
in Ruamoko progs make for a lot of noise. Showing only user defs (those
without a leading .) makes for a much more usable locals display.
2022-02-12 10:19:21 +09:00
Bill Currie
afd1eb775b [gamecode] Rename ev_pointer to ev_ptr
Rather short (no worse than ev_int, though) but more consistency is
usually a good thing.
2022-01-18 14:36:06 +09:00
Bill Currie
cfe7c44df0 [gamecode] Rename ev_integer to ev_int
And other related fields so integer is now int (and uinteger is uint). I
really don't know why I went with integer in the first place, but this
will make using macros easier for dealing with types.
2022-01-18 13:27:19 +09:00
Bill Currie
2df64384c1 [gamecode] Clean up string_t and pointer_t
They are both gone, and pr_pointer_t is now pr_ptr_t (pointer may be a
little clearer than ptr, but ptr is consistent with things like intptr,
and keeps the type name short).
2022-01-18 12:11:14 +09:00
Bill Currie
4111d44dcc [gamecode] Move progs auxiliary headers into a subdirectory
Just another step along the road of tidying up the QF include directory
(and desirable for generated data).
2022-01-09 00:26:52 +09:00
Bill Currie
ac25d9f1c1 [qwaq] Fix window closure
Now the device windows close properly when an input device is removed.
2021-09-26 10:35:24 +09:00
Bill Currie
1a5cce4374 [qwaq] Set table cell size in the correct place
I have no idea why I made LocalsData set the size instead of TableView,
but now the cells are correctly sized automatically.
2021-09-25 13:27:55 +09:00
Bill Currie
0df16fb210 [qwaq] Fix TableView's scrolling 2021-09-25 10:53:39 +09:00
Bill Currie
0a60f46a64 [qwaq] Implement more debugger def views
Structs and arrays now work (though could be better, eg collapsible).
2021-09-25 01:42:36 +09:00
Bill Currie
12ab283c22 [qwaq] Add a little z-transform program
And fix an error in floatview.

The z-transform program is so I can test out my math and eventually
develop some hopefully interesting sound generators.
2021-06-19 11:25:05 +09:00
Bill Currie
055ea46337 [qwaq] Fix page up/down and deal with tabs 2021-06-10 12:13:55 +09:00
Bill Currie
d23c9582f1 [qwaq] Implement execute-to-cursor
Support for finding the first address associated with a source line was
added to the engine, returning 0 if not found.

A temporary breakpoint is set and the progs allowed to run free.
However, better handling of temporary breakpoitns is needed as currently
a "permanent" breakpoint will be cleared without clearing the temporary
breakpoing if the permanent breakpoing is hit while execut-to-cursor is
running.
2021-06-08 16:54:04 +09:00
Bill Currie
f50d27ec11 [qwaq] Show dereferenced data for poitner defs
The code currently assumes a single value is referenced rather than the
beginning of an array.
2021-06-04 13:35:53 +09:00
Bill Currie
22b9bb29f6 [qwaq] Calculate type sizes for compound types 2021-06-04 13:34:15 +09:00
Bill Currie
7275d9bbf5 [qwaq] Fully load target types into debugger
Fully loading the types means that code using the target's type
definitions does not need to worry about pulling in sub-types for
structured data.
2021-06-04 13:31:43 +09:00
Bill Currie
53b553e892 [qwaq] Rework def views to support multi-row defs
Needed for structured types (arrays, structs, etc). The multiple rows
aren't implemented yet, but the initial groundwork is done.
2021-06-01 23:52:04 +09:00
Bill Currie
1914fa2756 [qwaq] Use full file path for file search
Fixes the memory leak (over 300 editors...)
2020-07-05 16:53:35 +09:00
Bill Currie
1910941426 [qwaq] Handle key events differently when running
Pressing F8 (or n) while the debug target was running would cause it to
stop at that point. While it's certainly desirable to stop a runaway
target on demand, that should be with a different input. Now, commands
that start the target running are ignored while the target is running.
No commands for when the target is running have been implemented yet,
but the provision is there.
2020-07-05 16:53:35 +09:00
Bill Currie
6d5ffa9f8e [build] Move to non-recursive make
There's still some cleanup to do, but everything seems to be working
nicely: `make -j` works, `make distcheck` passes. There is probably
plenty of bitrot in the package directories (RPM, debian), though.

The vc project files have been removed since those versions are way out
of date and quakeforge is pretty much dependent on gcc now anyway.

Most of the old Makefile.am files  are now Makemodule.am.  This should
allow for new Makefile.am files that allow local building (to be added
on an as-needed bases).  The current remaining Makefile.am files are for
standalone sub-projects.a

The installable bins are currently built in the top-level build
directory. This may change if the clutter gets to be too much.

While this does make a noticeable difference in build times, the main
reason for the switch was to take care of the growing dependency issues:
now it's possible to build tools for code generation (eg, using qfcc and
ruamoko programs for code-gen).
2020-06-25 11:35:37 +09:00
Bill Currie
e80344c58e [qwaq] Use full file path for loading source files 2020-04-04 14:34:18 +09:00
Bill Currie
63714c7c55 [qwaq] Add builtin to get a file's full path
If the file's base directory cannot be found, the file name is returned
as-is.
2020-04-04 12:51:42 +09:00
Bill Currie
9b1ce44fda [qwaq] Fix some issues with fetching type encodings
Now struct defs show FIXME instead of void data.
2020-04-02 19:31:11 +09:00
Bill Currie
63caa5794d [qwaq] Implement step-over tracing
I decided that stopping in between function calls that are on the same
line is a good thing as it gives a chance to skip over the first but
step into the second.
2020-04-02 17:44:53 +09:00
Bill Currie
ea1e85905c [qwaq] Implement source-level stepping
Now the debugger stops only when the source line has changed or the
statement address is stuck.
2020-04-02 13:07:50 +09:00
Bill Currie
7e51f26b10 [qwaq] Move all the def views into a subdirectory
More declutter.
2020-04-02 13:06:31 +09:00
Bill Currie
6d8bc395f4 [qwaq] Make debug event data available 2020-04-02 12:30:59 +09:00
Bill Currie
118fba8df5 [qwaq] Cope with functions that don't have locals
In this case, .ctor functions.
2020-04-02 00:51:22 +09:00
Bill Currie
154da7653d [qwaq] Quote the string value before display 2020-04-01 21:29:42 +09:00
Bill Currie
0e7c7640f4 [qwaq] Right-justify def value display
Now that *printf("%*.*s") works :)
2020-04-01 19:57:24 +09:00
Bill Currie
bd7212a411 [qwaq] Pass debug target into the def views
Needed for any views that have to fetch additional data (strings,
fields, etc).
2020-04-01 00:03:53 +09:00
Bill Currie
c515d63d97 [qwaq] Get the locals view working
All because I forgot I went the unixy way for qdb_get_data.
2020-03-31 23:23:18 +09:00
Bill Currie
beecdcadbf [qwaq] Support resizing the table view 2020-03-31 22:03:56 +09:00
Bill Currie
0da92e33f6 [qwaq] Use TableView to show locals
This is much nicer (even though things aren't quite right yet)
2020-03-31 21:15:57 +09:00
Bill Currie
5bb71c2089 [qwaq] Clean up some debug prints 2020-03-31 01:18:16 +09:00
Bill Currie
1a34f3663a [qwaq] Hook up the scroll bar
It's mostly working now, just some issues with clicking on the bar and
the thumb tab doesn't work.
2020-03-30 22:50:29 +09:00
Bill Currie
b8005a99c9 [qwaq] Add a scroll bar to the debug source window
It's not quite hooked up properly yet (Editor ignores the message), but
it did help get ScrollBar displaying properly.
2020-03-30 22:02:58 +09:00
Bill Currie
8a7fbdfc9f [qwaq] Rework allocation to use retain/release
It currently dies when single stepping or exiting due to EditBuffer's
retain count not getting incremented when initialized. This is because
EditBuffer is initialized in C and thus does not call Object's -init.
2020-03-30 16:58:36 +09:00
Bill Currie
6d3fadfe6e [qwaq] Move local defs viewer to its own class
While trying to build a view without deriving from it was a neat idea,
it doesn't work so well because a view really needs to know how to draw
itself. This even fixes the segfault when stepping past the end of the
program.
2020-03-30 13:42:31 +09:00
Bill Currie
1c13339bbe [qwaq] Create a type encoding class
For now it just manages type encodings via their encoding string,
ensuring types are fetched from the target only once, if at all (may
already have the type due to it being common).
2020-03-30 12:43:02 +09:00
Bill Currie
eccf1cb962 [qwaq] Move the debug builtin bindings 2020-03-30 09:38:22 +09:00
Bill Currie
6ff5b5c101 [qwaq] Clean up the qwaq directory
Things were getting rather cluttered with everything being qwaq-* and
all in one directory. Now most have lost the qwaq- prefix and have been
moved into subdirectories (non-recursive make).
2020-03-30 02:34:08 +09:00