Skip to content

Commit e0bca09

Browse files
authored
gh-142627: Ignore anonymous mappings in Linux remote debugging (#142628)
1 parent 7aa353c commit e0bca09

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Python/remote_debug.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -722,6 +722,11 @@ search_linux_map_for_section(proc_handle_t *handle, const char* secname, const c
722722
}
723723

724724
const char *path = line + path_pos;
725+
if (path[0] == '[' && path[strlen(path)-1] == ']') {
726+
// Skip [heap], [stack], [anon:cpython:pymalloc], etc.
727+
continue;
728+
}
729+
725730
const char *filename = strrchr(path, '/');
726731
if (filename) {
727732
filename++; // Move past the '/'

0 commit comments

Comments
 (0)