Ignore DW_TAG_padding in tag_is_type

Message ID 20240906165402.1787519-1-tromey@adacore.com
State New
Headers
Series Ignore DW_TAG_padding in tag_is_type |

Checks

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

Commit Message

Tom Tromey Sept. 6, 2024, 4:54 p.m. UTC
  DW_TAG_padding isn't a real tag -- it doesn't appear in the DWARF
standard, only in include/dwarf2.def as a placeholder.  So, remove it
from dwarf2/tag.h:tag_is_type.
---
 gdb/dwarf2/tag.h | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Tom de Vries Sept. 7, 2024, 2:06 a.m. UTC | #1
On 9/6/24 18:54, Tom Tromey wrote:
> DW_TAG_padding isn't a real tag -- it doesn't appear in the DWARF
> standard, only in include/dwarf2.def as a placeholder.  So, remove it
 > from dwarf2/tag.h:tag_is_type.

LGTM.

Reviewed-By: Tom de Vries <tdevries@suse.de>

Thanks,
- Tom

> ---
>   gdb/dwarf2/tag.h | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/gdb/dwarf2/tag.h b/gdb/dwarf2/tag.h
> index 2ceae5393b5..d82690b806a 100644
> --- a/gdb/dwarf2/tag.h
> +++ b/gdb/dwarf2/tag.h
> @@ -30,7 +30,6 @@ tag_is_type (dwarf_tag tag)
>   {
>     switch (tag)
>       {
> -    case DW_TAG_padding:
>       case DW_TAG_array_type:
>       case DW_TAG_class_type:
>       case DW_TAG_enumeration_type:
  

Patch

diff --git a/gdb/dwarf2/tag.h b/gdb/dwarf2/tag.h
index 2ceae5393b5..d82690b806a 100644
--- a/gdb/dwarf2/tag.h
+++ b/gdb/dwarf2/tag.h
@@ -30,7 +30,6 @@  tag_is_type (dwarf_tag tag)
 {
   switch (tag)
     {
-    case DW_TAG_padding:
     case DW_TAG_array_type:
     case DW_TAG_class_type:
     case DW_TAG_enumeration_type: