[3/7] Use form name in complaint in dwarf2_record_block_entry_pc

Message ID 20250311-attribute-unsigned-initial-v1-3-833f35aa0f29@adacore.com
State New
Headers
Series Handle unsigned DW_FORM_data* constants more nicely |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_gdb_build--master-arm success Build passed
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 success Build passed
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 success Test passed
linaro-tcwg-bot/tcwg_gdb_check--master-arm success Test passed

Commit Message

Tom Tromey March 11, 2025, 5 p.m. UTC
  This changes dwarf2_record_block_entry_pc to issue a complaint using
the form name rather than a value.  This seems more correct to me.
---
 gdb/dwarf2/read.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 85ad432192a207ccd35b4dbc79e7b6e7ba790edf..e2f8cab6c3a26ea31717274e653f897f6fc3cf5b 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -10035,8 +10035,8 @@  dwarf2_record_block_entry_pc (struct die_info *die, struct block *block,
 	    {
 	      /* We could possibly handle signed constants, but this is out
 		 of spec, so for now, just complain and ignore it.  */
-	      complaint (_("Unhandled constant for DW_AT_entry_pc, value (%s)"),
-			 plongest (attr->as_nonnegative ()));
+	      complaint (_("Invalid form for DW_AT_entry_pc: %s"),
+			 dwarf_form_name (attr->form));
 	    }
 	}
       else