Re: [hatari-devel] "profile stack" command added |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On lauantai 01 kesäkuu 2013, Eero Tamminen wrote:
> I also added arg showing for rest of non-MiNT GEMDOS calls when
> doing GEMDOS tracing, so now one could use this to track e.g.
> memory allocations from TOS:
>
> --- debugger commands ---
> profile on
> symbols prg
>
> # Maxalloc, Malloc, Mfree, Mshrink
> b GemdosOpcode = 0x44 :noinit :quiet :file showcallers.ini
> b GemdosOpcode = 0x48 :noinit :quiet :file showcallers.ini
> b GemdosOpcode = 0x49 :noinit :quiet :file showcallers.ini
> b GemdosOpcode = 0x4A :noinit :quiet :file showcallers.ini
>
> continue
> --- showcallers.ini ---
> profile stack
> b pc = "NextPC" :noinit :quiet :file showretval.ini
Sorry, this should have also ":once" option, otherwise you
might run out of breakpoints...
Unrelated question. Why in cart_asm.s:
-------------------
; This is the cartridge header:
dc.l $ABCDEF42 ; C-FLAG (magic value)
dc.l $00000000 ; C-NEXT
dc.l sys_init+$08000000 ; C-INIT - flag has bit 3 set = before
disk boot, but after GEMDOS init
$08000000 is added to sys_init address? What's the flag bit 3?
When TOS goes through cartridge code and jumps to that address
(which does linea_init variable setup for Hatari), PC gets an "illegal"
address value. Emulation itself masks the extra bits off from the
address, but profiling code throws a fit about it when I profile
TOS startup...
- Eero
> --- showretval.ini ---
> e d0
> -------------------
>
>
> - Eero
>
> [1] By default breakpoints re-initialize debugger state,
> which would reset profiling callstack.