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

Function debugmem_list_segment

src/debugmem.cpp:3833–3868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3831}
3832
3833bool debugmem_list_segment(int mode, uaecptr addr)
3834{
3835 if (mode) {
3836 for (int i = 0; i < segtrackermax; i++) {
3837 struct debugsegtracker *seg = dsegt[i];
3838 if (!seg->allocid)
3839 continue;
3840 console_out_f(_T("Load module '%s':\n"), seg->name);
3841 debugreportsegment(seg, true);
3842 }
3843 } else {
3844 if (addr == 0xffffffff) {
3845 if (!executable_last_segment) {
3846 console_out(_T("No executable loaded\n"));
3847 return false;
3848 }
3849 for (int i = 1; i <= executable_last_segment; i++) {
3850 debugreportalloc(allocs[i]);
3851 }
3852 return true;
3853 } else {
3854 struct debugsegtracker *seg = findsegment(addr, NULL);
3855 if (seg) {
3856 debugreportsegment(seg, false);
3857 return true;
3858 }
3859 if (ismysegment(addr)) {
3860 for (int i = 1; i <= executable_last_segment; i++) {
3861 debugreportalloc(allocs[i]);
3862 }
3863 return true;
3864 }
3865 }
3866 }
3867 return false;
3868}
3869
3870bool debugmem_get_range(uaecptr *start, uaecptr *end)
3871{

Callers 1

debug_lineFunction · 0.85

Calls 6

debugreportsegmentFunction · 0.85
debugreportallocFunction · 0.85
findsegmentFunction · 0.85
ismysegmentFunction · 0.85
console_out_fFunction · 0.50
console_outFunction · 0.50

Tested by

no test coverage detected