MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / get_base

Function get_base

src/debug.cpp:5784–5811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5782}
5783
5784static uaecptr get_base (const uae_char *name, int offset)
5785{
5786 uaecptr v = get_long_debug (4);
5787 addrbank *b = &get_mem_bank(v);
5788
5789 if (!b || !b->check (v, 400) || !(b->flags & ABFLAG_RAM))
5790 return 0;
5791 v += offset;
5792 while ((v = get_long_debug (v))) {
5793 uae_u32 v2;
5794 uae_u8 *p;
5795 b = &get_mem_bank (v);
5796 if (!b || !b->check (v, 32) || (!(b->flags & ABFLAG_RAM) && !(b->flags & ABFLAG_ROMIN)))
5797 goto fail;
5798 v2 = get_long_debug (v + 10); // name
5799 b = &get_mem_bank (v2);
5800 if (!b || !b->check (v2, 20))
5801 goto fail;
5802 if ((b->flags & ABFLAG_ROM) || (b->flags & ABFLAG_RAM) || (b->flags & ABFLAG_ROMIN)) {
5803 p = get_real_address_debug(v2);
5804 if (!memcmp (p, name, strlen (name) + 1))
5805 return v;
5806 }
5807 }
5808 return 0;
5809fail:
5810 return 0xffffffff;
5811}
5812
5813static TCHAR *getfrombstr(uaecptr pp)
5814{

Callers 1

show_exec_listsFunction · 0.70

Calls 2

get_real_address_debugFunction · 0.85
get_long_debugFunction · 0.70

Tested by

no test coverage detected