Commit graph

1149 commits

Author SHA1 Message Date
JetSetIlly
905bb2bcd3 imgui byte grid draws leading blank columns correctly
simplified drawByteGridSimple()
2023-01-24 22:47:52 +00:00
JetSetIlly
c842f87056 simplified/clarified loclist operations
stack values are distinct from loclist results

return value from DW_OP_ function simplified and name field moved to
loclistOperator type

added support for DW_OP_piece
2023-01-24 08:31:49 +00:00
JetSetIlly
dafbec9c1f govern mode field in sdlimgui is now an atomic value
added a small delay to the program after SDL SetFullscreen() has been
called. this seems to give the system time to make the change to the
full screen state - meaning that placement of imgui windows in the
debugger is more consistent
2023-01-21 09:20:46 +00:00
JetSetIlly
df6642af3e better presentation of variable errors in locals/globals windows 2023-01-16 18:39:32 +00:00
JetSetIlly
48e231409c better handling of inlined functions
executable lines annotated with an inline symbol in an inlined function,
instead of the chip symbol

dropped the idea where we yield all function variables regardless of
scope. it didn't play with how inlined functions work. will think about
how to implement the idea better
2023-01-16 18:39:32 +00:00
JetSetIlly
3e4a2a45ee simplified YieldedLocal type and improved how resolve errors are handled 2023-01-14 07:20:00 +00:00
JetSetIlly
62e6a5681d sourcelines note whether DWARF recommends that line is breakable
until the source window has been updated to indicate breakpoints/executable
lines better, the emulation will continue to allow breakpoints on any
executable line

variable location rule(s) taken from abstract variable entry as appropriate

changed breakpoint symbol
2023-01-14 07:20:00 +00:00
JetSetIlly
fef0cce551 renamed Read() and Write() to Access() and AccessDriven() for mappers
also renamed Listen() to AccessPassive()
2023-01-11 18:06:46 +00:00
JetSetIlly
1478b268d5 add support for trickling right mouse button
complements changes done for left mouse button (5325c5d968)
2023-01-07 09:33:11 +00:00
JetSetIlly
e293e8abf5 save timeline to CSV in menu popup
panel reports activity on select and reset being pressed/held

moved save to CSV option to context menu for source and globals window
2023-01-06 22:57:43 +00:00
JetSetIlly
68a2277edb clearer indication of scanline jitter in timeline window 2023-01-05 16:37:59 +00:00
JetSetIlly
dde9b678c9 tv screen coords line improved layout
added icon/tooltip showing geometry for most recent frame
2023-01-05 16:37:59 +00:00
JetSetIlly
f20557e359 fixed locals window "no source available" message 2023-01-03 09:54:54 +00:00
JetSetIlly
8be85a1bde coproc developer/disasm types are no longer pointer instances
this simplifies how the instances are accessed
2023-01-02 18:57:15 +00:00
JetSetIlly
c2556cee04 fixed insert and reloading of cartridges in the middle of execution
ReloadCartridge() and InsertCartridge() didn't interact with the input
loop very well. this meant that if those functions were called when
execution was deep inside the input loop (during execution of the ARM
program, for example) the emulator could crash

fixed by wrapping the functions in a loop unwinder (same mecahnism as
for rewind handling)
2022-12-28 22:43:11 +00:00
JetSetIlly
564ffcba0a polling sleep period reduced in the debugger when emulation is running 2022-12-27 10:55:41 +00:00
JetSetIlly
3cef773bb5 list of yielded locals do not repeat variable names
sometimes a function can contain more than variable with the same name
in different scopes. the list of locals now only include one entry for
each name

cleanup of code behind the "focus yield line" button in the source window
2022-12-26 23:25:46 +00:00
JetSetIlly
4bdc0925e3 wav encoder outputs 16bit values 2022-12-25 09:34:38 +00:00
JetSetIlly
66149550ad do not update global variables for OnYield()
we tried to avoid having to update variables from a non-emulation
goroutine but this turns out to have major performance impact

reverts many of the changes in 9c434f477
2022-12-07 10:32:22 +00:00
JetSetIlly
eae525bf51 coprocessor breakpoints now operates on a line of source
previously, the first address in the list of address for a line of
source was used. however, this was poor because the first address in a
loop for example, is probably never called again even when the loop
iterates

this method should also naturally lend itself to single stepping through
the source (not yet implemented)
2022-12-04 09:08:26 +00:00
JetSetIlly
9c434f477c changed when DWARF variables are updated - on yield
globals are also updated on startup but no longer when a CSV file is
requested
2022-12-03 18:58:09 +00:00
JetSetIlly
817a521a24 correct filtering of local variables in yield function
previous filter didn't take into account many factors, including: the
possibility of multiple local variables with the same name; iterating
over a map is random so the results seen were unpredictable
2022-12-02 20:11:00 +00:00
JetSetIlly
cb22a23b7f dropped use of lexical blocks to help local variable resolution
corrected address range field for SourceFunction. the address range
referred to the declaration line only. this wasn't actually used for
anything meaningful so the error wasn't noticed. but we do want to use
it in order to help locate local variables
2022-12-01 16:11:45 +00:00
JetSetIlly
e7d6a92c3a added formal parameters and lexical blocks to DWARF parsing
not an entirely successful experiment. lexical blocks don't quite work
how I expected but I think this is generally better
2022-11-30 19:04:07 +00:00
JetSetIlly
272c87c7e0 altered the matching of local variables to yielded PC value
if any instuction associated with the source line that the PC address is
associated with is within range of a variable then the variable is
considered to in scope and will be displayed in the local variables
window
2022-11-28 20:51:56 +00:00
JetSetIlly
4823086dc1 fuzzy file selector in globals window
globals window also default to "List all globals (in all files)"
2022-11-20 20:47:16 +00:00
JetSetIlly
1adc8f91db local variables mostly fully functional now
not all DWARF expression operators are implemented but there's enough
for us to assess whether the system is working correctly
2022-11-20 20:13:01 +00:00
JetSetIlly
1ad3b98ed3 proof-of-concept for local variable inspection
only local variables that are stored in registers are handled at the
moment but that's good enough to show the basic breakpoint mechanism
works

sketched in local variables window
2022-11-16 19:08:45 +00:00
JetSetIlly
64e98d2fd6 reworked how SourceVariables are built/represented
addresses/values are retreived from memory dynamically. this is
preparatory work for local variable support

coproc globals window vastly simplified as a result of these changes
2022-11-16 09:23:43 +00:00
JetSetIlly
160abaad3e fixed fuzzy selection when using mouse to select entry 2022-11-16 09:23:43 +00:00
JetSetIlly
2e94d5f4b1 better presentation of coprocessor source window
horizontal bar always shown if window is small enough for at least one
line in the file

horizontal scrolling for source window

line selection works better and more consistently

disasm tooltip does not flicker during line selection

list of short filenames sorted (coprocessor source files)
2022-11-15 21:35:40 +00:00
JetSetIlly
5325c5d968 support trickling of left mouse button event to dear imgui
if a left mouse button is pressed down and up in the same frame, imgui
will not see the down event. trickling the two events over two frames
should solve the problem
2022-11-15 21:35:40 +00:00
JetSetIlly
cad2d2b93f added preference to alter OpenGL refresh policy
this is primarily a test to see if disabled VSYNC fixes an observed
problem on MacOS Ventura (13.0)
2022-11-15 21:35:40 +00:00
JetSetIlly
e4e85c9a01 fixed file selector
file was not updated on file selection
2022-11-12 14:04:37 +00:00
JetSetIlly
7acdf1ce1d more efficient comparison of Yield states. timestamps are expensive
"Focus Yield Line" works when emulation is not paused
2022-11-07 19:06:19 +00:00
JetSetIlly
7f93fdbd79 improved conditions for opening source window
switching from playmode to debugger on break or manually would leave the
source window in a blank state
2022-11-06 21:49:04 +00:00
JetSetIlly
b01dff193d clarified ARM yield concepts and introduced Interrupt() to help
more careful enabling/disabling of cartridge breakpoint. we don't want
them triggering during rewinding or during startup, for example

transition from playmode to the debugger when a breakpoint is triggered,
works better - still not perfect though
2022-11-06 20:27:00 +00:00
JetSetIlly
6ef3ffbcef renamed and commented coprocessor YieldReason values 2022-11-05 20:59:34 +00:00
JetSetIlly
e65b00a9c9 coprocessor yield now have reasons (eg. breakpoint, undefined behaviour, etc.)
acquire critical section in OnYield()
2022-11-05 20:59:29 +00:00
JetSetIlly
97249ad1f3 CartStaticBus.PutStatic() idx argument is of type int
it was of type uint16 which isn't large enough for some scenarios. in
particular, the ACE on PlusCart examples

corrected commentary
2022-11-05 08:47:10 +00:00
JetSetIlly
8fa42d6f0a renamed IllegalAccess field to Bug in developer.SourceLine
removed Interleaved field from developer.SourceLine
2022-11-03 16:17:12 +00:00
JetSetIlly
2416d8d4b6 source window on first open with focus on yield line
if yield line is invalid then it focuses on the "main" function as
before

this is useful for situations where the program runs into a problem
immediately on initialisation
2022-11-03 15:59:54 +00:00
JetSetIlly
ff4e30742f source window would crash if DWARF was valid but no source available
if a DWARF was built on another machine it is likely that the path the
source code is wrong. the DWARF can be loaded and would be useful but
without source information to back it up

an additional nil check in the source window resolves that
2022-11-03 13:43:54 +00:00
JetSetIlly
b0c55a0da0 nil check replaced with IsStub() (in illegal access window)
continues/corrects code refactor started in bd83993b2
2022-11-01 14:35:25 +00:00
JetSetIlly
c23cd3af26 added fuzzy filter for source code content
changed (simplified) behaviour of fuzzyFilter (renamed from
fuzzyMatcher) so that it is drawn as a complete unit, as opposed to a
text input widget and a separate selection list
2022-11-01 13:01:35 +00:00
JetSetIlly
fdbdc278b2 nil check replaced with IsStub()
continues/corrects code refactor started in bd83993b2
2022-11-01 13:01:35 +00:00
JetSetIlly
bd83993b2f reworked/clarified how stub entries in the developer package work 2022-10-30 18:15:47 +00:00
JetSetIlly
8d67cab563 fuzzy matching for file selector in coprocessor source window
files can be references by the file's short filename. the file selector
uses these short names

added dependency on github.com/sahilm/fuzzy
2022-10-30 13:24:13 +00:00
JetSetIlly
1de9614e2e first working version of ARM breakpoints
UI is rudimentary for now and of course, there is no local variable
inspection

implemented for CDF and ACE only for now. DPC+ will use the same
technique as CDF once it's been finalised and ELF will be similar to ACE
2022-10-29 07:48:30 +01:00
JetSetIlly
e34ed4e954 in coproc source parsing <entry> is now referred to as <driver>
<entry> wasn't really a good name for what was happening. any
instructions that are outside of the ROM are executed or otherwise
handled in the driver, represented by the emulation

this works well for ELF in particular in which StrongArm ROMs make
heavy use of the driver
2022-10-26 11:27:37 +01:00