diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2021-10-13 10:04:39 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2021-10-14 11:04:13 +0200 |
commit | 3d0a7271b383c95d5c8dc9647966517a61e71abb (patch) | |
tree | 226df0b2ff1edc10688cbeaa028c12c3177f218b /gcc/bitmap.c | |
parent | 6e3bfd60e87303b32bf2284ea4e79078f488bc95 (diff) | |
download | gcc-3d0a7271b383c95d5c8dc9647966517a61e71abb.zip gcc-3d0a7271b383c95d5c8dc9647966517a61e71abb.tar.gz gcc-3d0a7271b383c95d5c8dc9647966517a61e71abb.tar.bz2 |
Add debug helpers for auto_bitmap.
Using debug() on an auto_bitmap from gdb doesn't work because the
implicit conversion from auto_bitmap to bitmap_head doesn't work
from within a debugging session. This patch adds the convenience
functions for auto_bitmap.
gcc/ChangeLog:
* bitmap.c (debug): New overloaded function for auto_bitmaps.
* bitmap.h (debug): Same.
Diffstat (limited to 'gcc/bitmap.c')
-rw-r--r-- | gcc/bitmap.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index b915fdf..98c6d0b 100644 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -2830,6 +2830,18 @@ debug (const bitmap_head *ptr) fprintf (stderr, "<nil>\n"); } +DEBUG_FUNCTION void +debug (const auto_bitmap &ref) +{ + debug ((const bitmap_head &) ref); +} + +DEBUG_FUNCTION void +debug (const auto_bitmap *ptr) +{ + debug ((const bitmap_head *) ptr); +} + void bitmap_head::dump () { |