Re: Disabling warnings for certain operations
Tom Tromey <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
Matheus> As a workaround, I've hacked around GDB a bit, and added an option in Matheus> `target.c` (set through `set print-default-memory-search-warnings Matheus> off`) to suppress the warning message when `simple_search_memory` is Matheus> called from `default_search_memory`. Ideally, I'd like to submit some Matheus> form of achieving this as a patch, but the current solution feels Matheus> hacky and rough. TBH I'd expect reading inaccessible memory to throw a Python exception. Matheus> Is there a better way to do this? Or some way to query whether a range Matheus> can be read ahead of time so that calling `gdb.Inferior.search_memory` Matheus> may be skipped for those ranges, avoiding the path that would trigger Matheus> the warning altogether? I wonder if "info proc mappings" could be used somehow, or extended to provide some Python API. Anyway I think doing something here would be great -- the real question is just which approach is both useful and doable. Tom