Skip to contentSkip to conversation

Handle DWARF5 DW_TAG_call_site like DW_TAG_GNU_call_site

PATCH In review Mark Wielaard 2 participants 4 messages Jan 31, 2021 – Feb 1, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Handle DWARF5 DW_TAG_call_site like DW_TAG_GNU_call_site

DW_TAG_call_site and DW_TAG_call_site_parameter are the standardized DWARF5 versions of DW_TAG_GNU_call_site and DW_TAG_GNU call_site_parameter. Handle them the same way (which is by ignoring them).

https://bugzilla.redhat.com/show_bug.cgi?id=1922698

---
 dwarf_loader.c | 7 +++++++
 1 file changed, 7 insertions(+)
dwarf_loader.c +7 -0
index ac22c1b..3bdf570 100644
@@ -41,6 +41,11 @@ struct strings *strings;
 #define DW_TAG_GNU_call_site_parameter 0x410a
 #endif
 
+#ifndef DW_TAG_call_site
+#define DW_TAG_call_site 0x48
+#define DW_TAG_call_site_parameter 0x49
+#endif
+
 #define hashtags__fn(key) hash_64(key, HASHTAGS__BITS)
 
 bool no_bitfield_type_recode = true;
@@ -1595,6 +1600,8 @@ static int die__process_function(Dwarf_Die *die, struct ftype *ftype,
 		uint32_t id;
 
 		switch (dwarf_tag(die)) {
+		case DW_TAG_call_site:
+		case DW_TAG_call_site_parameter:
 		case DW_TAG_GNU_call_site:
 		case DW_TAG_GNU_call_site_parameter:
 			/*
Signature · 1 line
2.20.1
#1 lore raw

Em Sun, Jan 31, 2021 at 01:27:31AM +0100, Mark Wielaard escreveu:

Quoted 3 lines

DW_TAG_call_site and DW_TAG_call_site_parameter are the standardized DWARF5 versions of DW_TAG_GNU_call_site and DW_TAG_GNU call_site_parameter. Handle them the same way (which is by ignoring them).

Thanks, I added these two lines, plese let me know if you're not ok with it:

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1922698

Quoted 33 lines

https://bugzilla.redhat.com/show_bug.cgi?id=1922698

---
 dwarf_loader.c | 7 +++++++
 1 file changed, 7 insertions(+)
dwarf_loader.c +7 -0
index ac22c1b..3bdf570 100644
@@ -41,6 +41,11 @@ struct strings *strings;
 #define DW_TAG_GNU_call_site_parameter 0x410a
 #endif
 
+#ifndef DW_TAG_call_site
+#define DW_TAG_call_site 0x48
+#define DW_TAG_call_site_parameter 0x49
+#endif
+
 #define hashtags__fn(key) hash_64(key, HASHTAGS__BITS)
 
 bool no_bitfield_type_recode = true;
@@ -1595,6 +1600,8 @@ static int die__process_function(Dwarf_Die *die, struct ftype *ftype,
 		uint32_t id;
 
 		switch (dwarf_tag(die)) {
+		case DW_TAG_call_site:
+		case DW_TAG_call_site_parameter:
 		case DW_TAG_GNU_call_site:
 		case DW_TAG_GNU_call_site_parameter:
 			/*
Signature · 1 line
2.20.1
Signature · 1 line
- Arnaldo
#2 lore raw
Quoted 10 lines · Arnaldo Carvalho de Melo

Em Sun, Jan 31, 2021 at 01:27:31AM +0100, Mark Wielaard escreveu:

Quoted 3 lines

DW_TAG_call_site and DW_TAG_call_site_parameter are the standardized DWARF5 versions of DW_TAG_GNU_call_site and DW_TAG_GNU call_site_parameter. Handle them the same way (which is by ignoring them).

Thanks, I added these two lines, plese let me know if you're not ok with it:

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1922698

That is of course fine.
Sorry for not adding them myself.

Thanks,

Mark

#3 lore raw

Em Mon, Feb 01, 2021 at 01:32:51PM +0100, Mark Wielaard escreveu:

Quoted 6 lines · Arnaldo Carvalho de Melo
Quoted 5 lines

Em Sun, Jan 31, 2021 at 01:27:31AM +0100, Mark Wielaard escreveu:

Quoted 3 lines

DW_TAG_call_site and DW_TAG_call_site_parameter are the standardized DWARF5 versions of DW_TAG_GNU_call_site and DW_TAG_GNU call_site_parameter. Handle them the same way (which is by ignoring them).

Quoted 8 lines
Quoted 5 lines

Thanks, I added these two lines, plese let me know if you're not ok with it:

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1922698

That is of course fine.
Sorry for not adding them myself.

Thanks!

- Arnaldo