gdb: change frame_info::prev_func::p type to cached_copy_status
authorSimon Marchi <simon.marchi@efficios.com>
Tue, 4 Aug 2020 18:52:44 +0000 (14:52 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 4 Aug 2020 18:52:44 +0000 (14:52 -0400)
commitfedfee8850a861dd5eba402de7db67f9f01c92c6
tree907d7ce437b365b61ea76f23127ea09e2fa9a6a5
parent6cfa9b59e25aaddae2f09d185330787b68a3559d
gdb: change frame_info::prev_func::p type to cached_copy_status

One might think that variable `frame_info::prev_func::p` is a simple
true/false value, but that's not the case, it can also have the value -1
to mean "unavaiable".  Change it to use the `cached_copy_status` enum,
which seems designed exactly for this purpose.

Rename to `status` to be consistent with `prev_pc::status` (and be cause
`p` means `predicate`, which implies boolean, which this is not).

gdb/ChangeLog:

* frame.c (frame_info) <prev_func> <p>: Rename to status, change
type to cached_copy_status.
(fprintf_frame): Adjust.
(get_frame_func_if_available): Adjust.
(frame_cleanup_after_sniffer): Adjust.

Change-Id: I50c6ebef6c0acb076e25c741f7f417bfd101d953
gdb/ChangeLog
gdb/frame.c