PR25058 - Support decl DIEs referring to symbols using DW_AT_ranges
authorDodji Seketeli <dodji@redhat.com>
Thu, 3 Oct 2019 15:15:28 +0000 (17:15 +0200)
committerDodji Seketeli <dodji@redhat.com>
Thu, 3 Oct 2019 15:42:30 +0000 (17:42 +0200)
Usually, function DIEs (DW_TAG_subprogram) refer to the address of the
underlying ELF symbol by using the DW_AT_low_pc attribute.  However,
there are cases where it does so by using the DW_AT_ranges attribute.
In those cases, the first address of the sequence defined in the value
of that attribute is the address of the ELF symbol.

The problem is that the DWARF reader of Libabigail fails to get the
address of the underlying ELF symbol when the DW_AT_low_pc attribute
is missing.  Rather, it should then look at the value of the
DW_AT_ranges attribute instead.

This is what this patch does.

* src/abg-dwarf-reader.cc
(read_context::get_first_address_from_DW_AT_ranges): Define new
member function.
(read_context::get_function_address): Use the new
read_context::get_first_address_from_DW_AT_ranges here.
* tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt:
New reference test output.
* tests/data/test-diff-dwarf/PR25058-liblttng-ctl.so: New test
input binary.
* tests/data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so: New test
input binary.
* tests/data/Makefile.am: Add the new test materials above to
source distribution.
* tests/test-diff-dwarf.cc (in_out_specs): Add the new input test
input binary files to this test harness.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
src/abg-dwarf-reader.cc
tests/data/Makefile.am
tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt [new file with mode: 0644]
tests/data/test-diff-dwarf/PR25058-liblttng-ctl.so [new file with mode: 0644]
tests/data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so [new file with mode: 0644]
tests/test-diff-dwarf.cc

index 0769405..1c9b816 100644 (file)
@@ -8565,6 +8565,27 @@ public:
     return addr;
   }
 
+  /// Get the first address in the set of addresses referred to by the
+  /// DW_AT_ranges attribute of a given DIE.
+  ///
+  /// @param die the DIE we are considering.
+  ///
+  /// @param address output parameter.  This is set to the first
+  /// address found in the sequence pointed to by the DW_AT_ranges
+  /// attribute found on the DIE @p die, iff the function returns
+  /// true.  Otherwise, no value is set into this output parameter.
+  ///
+  /// @return true iff the DIE @p die does have a DW_AT_ranges
+  /// attribute and an address was found in its sequence value.
+  bool
+  get_first_address_from_DW_AT_ranges(Dwarf_Die* die, Dwarf_Addr& address) const
+  {
+    Dwarf_Addr base;
+    Dwarf_Addr end_addr;
+    if (dwarf_ranges(die, /*offset=*/0, &base, &address, &end_addr))
+      return true;
+    return false;
+  }
 
   /// Get the address of the function.
   ///
@@ -8580,15 +8601,20 @@ public:
   ///
   /// @return true if the function address was found.
   bool
-  get_function_address(Dwarf_Die* function_die,
-                      Dwarf_Addr& address) const
+  get_function_address(Dwarf_Die* function_die, Dwarf_Addr& address) const
   {
-    Dwarf_Addr low_pc = 0;
-    if (!die_address_attribute(function_die, DW_AT_low_pc, low_pc))
-      return false;
+    Dwarf_Addr fn_address = 0;
+    if (!die_address_attribute(function_die, DW_AT_low_pc, fn_address))
+      // So no DW_AT_low_pc was found.  Let's see if the function DIE
+      // has got a DW_AT_ranges attribute instead.  If it does, the
+      // first address of the set of addresses represented by the
+      // value of that DW_AT_ranges represents the function (symbol)
+      // address we are looking for.
+      if (!get_first_address_from_DW_AT_ranges(function_die, fn_address))
+       return false;
 
-    low_pc = maybe_adjust_fn_sym_address(low_pc);
-    address = low_pc;
+    fn_address = maybe_adjust_fn_sym_address(fn_address);
+    address = fn_address;
     return true;
   }
 
index e1177cc..54b3d6e 100644 (file)
@@ -330,6 +330,9 @@ test-diff-dwarf/test46-readme.txt \
 test-diff-dwarf/test46-rust-libone.so \
 test-diff-dwarf/test46-rust-libtwo.so \
 test-diff-dwarf/test46-rust-report-0.txt \
+test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt \
+test-diff-dwarf/PR25058-liblttng-ctl.so \
+test-diff-dwarf/PR25058-liblttng-ctl2.10.so \
 \
 test-read-dwarf/test0                  \
 test-read-dwarf/test0.abi                      \
diff --git a/tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt
new file mode 100644 (file)
index 0000000..cb41cc7
--- /dev/null
@@ -0,0 +1,363 @@
+Functions changes summary: 0 Removed, 25 Changed, 79 Added functions
+Variables changes summary: 0 Removed, 0 Changed, 3 Added variables
+
+79 Added functions:
+
+  [A] 'function lttng_condition* lttng_condition_session_consumed_size_create()'
+  [A] 'function lttng_condition_status lttng_condition_session_consumed_size_get_session_name(const lttng_condition*, const char**)'
+  [A] 'function lttng_condition_status lttng_condition_session_consumed_size_get_threshold(const lttng_condition*, uint64_t*)'
+  [A] 'function lttng_condition_status lttng_condition_session_consumed_size_set_session_name(lttng_condition*, const char*)'
+  [A] 'function lttng_condition_status lttng_condition_session_consumed_size_set_threshold(lttng_condition*, uint64_t)'
+  [A] 'function lttng_condition* lttng_condition_session_rotation_completed_create()'
+  [A] 'function lttng_condition_status lttng_condition_session_rotation_get_session_name(const lttng_condition*, const char**)'
+  [A] 'function lttng_condition* lttng_condition_session_rotation_ongoing_create()'
+  [A] 'function lttng_condition_status lttng_condition_session_rotation_set_session_name(lttng_condition*, const char*)'
+  [A] 'function lttng_error_code lttng_create_session_ext(lttng_session_descriptor*)'
+  [A] 'function lttng_error_code lttng_destroy_session_ext(const char*, lttng_destruction_handle**)'
+  [A] 'function void lttng_destruction_handle_destroy(lttng_destruction_handle*)'
+  [A] 'function lttng_destruction_handle_status lttng_destruction_handle_get_archive_location(const lttng_destruction_handle*, const lttng_trace_archive_location**)'
+  [A] 'function lttng_destruction_handle_status lttng_destruction_handle_get_result(const lttng_destruction_handle*, lttng_error_code*)'
+  [A] 'function lttng_destruction_handle_status lttng_destruction_handle_get_rotation_state(const lttng_destruction_handle*, lttng_rotation_state*)'
+  [A] 'function lttng_destruction_handle_status lttng_destruction_handle_wait_for_completion(lttng_destruction_handle*, int)'
+  [A] 'function int lttng_elf_get_sdt_probe_offsets(int, const char*, const char*, uint64_t**, uint32_t*)'
+  [A] 'function int lttng_elf_get_symbol_offset(int, char*, uint64_t*)'
+  [A] 'function lttng_evaluation_status lttng_evaluation_session_consumed_size_get_consumed_size(const lttng_evaluation*, uint64_t*)'
+  [A] 'function lttng_evaluation_status lttng_evaluation_session_rotation_completed_get_location(const lttng_evaluation*, const lttng_trace_archive_location**)'
+  [A] 'function lttng_evaluation_status lttng_evaluation_session_rotation_get_id(const lttng_evaluation*, uint64_t*)'
+  [A] 'function lttng_event* lttng_event_create()'
+  [A] 'function void lttng_event_destroy(lttng_event*)'
+  [A] 'function const lttng_userspace_probe_location* lttng_event_get_userspace_probe_location(const lttng_event*)'
+  [A] 'function int lttng_event_set_userspace_probe_location(lttng_event*, lttng_userspace_probe_location*)'
+  [A] 'function lttng_notification_channel_status lttng_notification_channel_has_pending_notification(lttng_notification_channel*, bool*)'
+  [A] 'function int lttng_rotate_session(const char*, lttng_rotation_immediate_descriptor*, lttng_rotation_handle**)'
+  [A] 'function void lttng_rotation_handle_destroy(lttng_rotation_handle*)'
+  [A] 'function lttng_rotation_status lttng_rotation_handle_get_archive_location(lttng_rotation_handle*, const lttng_trace_archive_location**)'
+  [A] 'function lttng_rotation_status lttng_rotation_handle_get_state(lttng_rotation_handle*, lttng_rotation_state*)'
+  [A] 'function void lttng_rotation_schedule_destroy(lttng_rotation_schedule*)'
+  [A] 'function lttng_rotation_schedule_type lttng_rotation_schedule_get_type(const lttng_rotation_schedule*)'
+  [A] 'function lttng_rotation_schedule* lttng_rotation_schedule_periodic_create()'
+  [A] 'function lttng_rotation_status lttng_rotation_schedule_periodic_get_period(const lttng_rotation_schedule*, uint64_t*)'
+  [A] 'function lttng_rotation_status lttng_rotation_schedule_periodic_set_period(lttng_rotation_schedule*, uint64_t)'
+  [A] 'function lttng_rotation_schedule* lttng_rotation_schedule_size_threshold_create()'
+  [A] 'function lttng_rotation_status lttng_rotation_schedule_size_threshold_get_threshold(const lttng_rotation_schedule*, uint64_t*)'
+  [A] 'function lttng_rotation_status lttng_rotation_schedule_size_threshold_set_threshold(lttng_rotation_schedule*, uint64_t)'
+  [A] 'function void lttng_rotation_schedules_destroy(lttng_rotation_schedules*)'
+  [A] 'function const lttng_rotation_schedule* lttng_rotation_schedules_get_at_index(const lttng_rotation_schedules*, unsigned int)'
+  [A] 'function lttng_rotation_status lttng_rotation_schedules_get_count(const lttng_rotation_schedules*, unsigned int*)'
+  [A] 'function lttng_rotation_status lttng_session_add_rotation_schedule(const char*, const lttng_rotation_schedule*)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_create(const char*)'
+  [A] 'function void lttng_session_descriptor_destroy(lttng_session_descriptor*)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_live_create(const char*, long long unsigned int)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_live_network_create(const char*, const char*, const char*, long long unsigned int)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_local_create(const char*, const char*)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_network_create(const char*, const char*, const char*)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_snapshot_create(const char*)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_snapshot_local_create(const char*, const char*)'
+  [A] 'function lttng_session_descriptor* lttng_session_descriptor_snapshot_network_create(const char*, const char*, const char*)'
+  [A] 'function lttng_error_code lttng_session_get_creation_time(const lttng_session*, uint64_t*)'
+  [A] 'function int lttng_session_list_rotation_schedules(const char*, lttng_rotation_schedules**)'
+  [A] 'function lttng_rotation_status lttng_session_remove_rotation_schedule(const char*, const lttng_rotation_schedule*)'
+  [A] 'function lttng_trace_archive_location_type lttng_trace_archive_location_get_type(const lttng_trace_archive_location*)'
+  [A] 'function lttng_trace_archive_location_status lttng_trace_archive_location_local_get_absolute_path(const lttng_trace_archive_location*, const char**)'
+  [A] 'function lttng_trace_archive_location_status lttng_trace_archive_location_relay_get_control_port(const lttng_trace_archive_location*, uint16_t*)'
+  [A] 'function lttng_trace_archive_location_status lttng_trace_archive_location_relay_get_data_port(const lttng_trace_archive_location*, uint16_t*)'
+  [A] 'function lttng_trace_archive_location_status lttng_trace_archive_location_relay_get_host(const lttng_trace_archive_location*, const char**)'
+  [A] 'function lttng_trace_archive_location_status lttng_trace_archive_location_relay_get_protocol_type(const lttng_trace_archive_location*, lttng_trace_archive_location_relay_protocol_type*)'
+  [A] 'function lttng_trace_archive_location_status lttng_trace_archive_location_relay_get_relative_path(const lttng_trace_archive_location*, const char**)'
+  [A] 'function void lttng_userspace_probe_location_destroy(lttng_userspace_probe_location*)'
+  [A] 'function lttng_userspace_probe_location* lttng_userspace_probe_location_function_create(const char*, const char*, lttng_userspace_probe_location_lookup_method*)'
+  [A] 'function int lttng_userspace_probe_location_function_get_binary_fd(const lttng_userspace_probe_location*)'
+  [A] 'function const char* lttng_userspace_probe_location_function_get_binary_path(const lttng_userspace_probe_location*)'
+  [A] 'function const char* lttng_userspace_probe_location_function_get_function_name(const lttng_userspace_probe_location*)'
+  [A] 'function lttng_userspace_probe_location_function_instrumentation_type lttng_userspace_probe_location_function_get_instrumentation_type(const lttng_userspace_probe_location*)'
+  [A] 'function lttng_userspace_probe_location_status lttng_userspace_probe_location_function_set_instrumentation_type(const lttng_userspace_probe_location*, lttng_userspace_probe_location_function_instrumentation_type)'
+  [A] 'function const lttng_userspace_probe_location_lookup_method* lttng_userspace_probe_location_get_lookup_method(const lttng_userspace_probe_location*)'
+  [A] 'function lttng_userspace_probe_location_type lttng_userspace_probe_location_get_type(const lttng_userspace_probe_location*)'
+  [A] 'function void lttng_userspace_probe_location_lookup_method_destroy(lttng_userspace_probe_location_lookup_method*)'
+  [A] 'function lttng_userspace_probe_location_lookup_method* lttng_userspace_probe_location_lookup_method_function_elf_create()'
+  [A] 'function lttng_userspace_probe_location_lookup_method_type lttng_userspace_probe_location_lookup_method_get_type(const lttng_userspace_probe_location_lookup_method*)'
+  [A] 'function lttng_userspace_probe_location_lookup_method* lttng_userspace_probe_location_lookup_method_tracepoint_sdt_create()'
+  [A] 'function lttng_userspace_probe_location* lttng_userspace_probe_location_tracepoint_create(const char*, const char*, const char*, lttng_userspace_probe_location_lookup_method*)'
+  [A] 'function int lttng_userspace_probe_location_tracepoint_get_binary_fd(const lttng_userspace_probe_location*)'
+  [A] 'function const char* lttng_userspace_probe_location_tracepoint_get_binary_path(const lttng_userspace_probe_location*)'
+  [A] 'function const char* lttng_userspace_probe_location_tracepoint_get_probe_name(const lttng_userspace_probe_location*)'
+  [A] 'function const char* lttng_userspace_probe_location_tracepoint_get_provider_name(const lttng_userspace_probe_location*)'
+
+25 functions with some indirect sub-type change:
+
+  [C]'function int lttng_add_context(lttng_handle*, lttng_event_context*, const char*, const char*)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event_context*' has sub-type changes:
+      in pointed to type 'struct lttng_event_context':
+        type size hasn't changed
+        2 data member changes:
+         type of 'lttng_event_context_type lttng_event_context::ctx' changed:
+           type size hasn't changed
+           2 enumerator insertions:
+             'lttng_event_context_type::LTTNG_EVENT_CONTEXT_CALLSTACK_KERNEL' value '20'
+             'lttng_event_context_type::LTTNG_EVENT_CONTEXT_CALLSTACK_USER' value '21'
+
+
+         type of 'union {lttng_event_perf_counter_ctx perf_counter; struct {char* provider_name; char* ctx_name;} app_ctx; char padding[288];} lttng_event_context::u' changed:
+           type name changed from '__anonymous_union__4' to '__anonymous_union__5'
+           type size hasn't changed
+
+           3 data member changes:
+            name of '__anonymous_union__4::app_ctx' changed to '__anonymous_union__5::app_ctx'
+            name of '__anonymous_union__4::padding' changed to '__anonymous_union__5::padding'
+            name of '__anonymous_union__4::perf_counter' changed to '__anonymous_union__5::perf_counter'
+           type changed from:
+             union {lttng_event_perf_counter_ctx perf_counter; struct {char* provider_name; char* ctx_name;} app_ctx; char padding[288];}
+           to:
+             union {lttng_event_perf_counter_ctx perf_counter; struct {char* provider_name; char* ctx_name;} app_ctx; char padding[288];}
+
+  [C]'function lttng_condition_type lttng_condition_get_type(const lttng_condition*)' has some indirect sub-type changes:
+    return type changed:
+      type size hasn't changed
+      3 enumerator insertions:
+        'lttng_condition_type::LTTNG_CONDITION_TYPE_SESSION_CONSUMED_SIZE' value '100'
+        'lttng_condition_type::LTTNG_CONDITION_TYPE_SESSION_ROTATION_ONGOING' value '103'
+        'lttng_condition_type::LTTNG_CONDITION_TYPE_SESSION_ROTATION_COMPLETED' value '104'
+
+
+  [C]'function int lttng_disable_event_ext(lttng_handle*, lttng_event*, const char*, const char*)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event*' has sub-type changes:
+      in pointed to type 'struct lttng_event':
+        type size hasn't changed
+        1 data member change:
+         type of 'lttng_event_type lttng_event::type' changed:
+           type size hasn't changed
+           1 enumerator insertion:
+             'lttng_event_type::LTTNG_EVENT_USERSPACE_PROBE' value '6'
+
+
+
+  [C]'function int lttng_enable_event(lttng_handle*, lttng_event*, const char*)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event*' has sub-type changes:
+      pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_enable_event_with_exclusions(lttng_handle*, lttng_event*, const char*, const char*, int, char**)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event*' has sub-type changes:
+      pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_enable_event_with_filter(lttng_handle*, lttng_event*, const char*, const char*)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event*' has sub-type changes:
+      pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function lttng_condition_type lttng_evaluation_get_type(const lttng_evaluation*)' has some indirect sub-type changes:
+    return type changed:
+      enum type 'enum lttng_condition_type' changed, as reported earlier
+
+  [C]'function int lttng_event_get_exclusion_name(lttng_event*, size_t, const char**)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_event*' has sub-type changes:
+      pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_event_get_exclusion_name_count(lttng_event*)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_event*' has sub-type changes:
+      pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_event_get_filter_expression(lttng_event*, const char**)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_event*' has sub-type changes:
+      pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_list_events(lttng_handle*, const char*, lttng_event**)' has some indirect sub-type changes:
+    parameter 3 of type 'lttng_event**' has sub-type changes:
+      in pointed to type 'lttng_event*':
+        pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_list_sessions(lttng_session**)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_session**' has sub-type changes:
+      in pointed to type 'lttng_session*':
+        in pointed to type 'struct lttng_session':
+          type size changed from 35008 to 35072 (in bits)
+          1 data member deletion:
+            'char lttng_session::padding[12]', at offset 34912 (in bits)
+
+          1 data member insertion:
+            'union {char padding[12]; void* ptr;} lttng_session::extended', at offset 34944 (in bits)
+
+  [C]'function int lttng_list_syscalls(lttng_event**)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_event**' has sub-type changes:
+      in pointed to type 'lttng_event*':
+        pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function int lttng_list_tracepoint_fields(lttng_handle*, lttng_event_field**)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event_field**' has sub-type changes:
+      in pointed to type 'lttng_event_field*':
+        in pointed to type 'struct lttng_event_field':
+          type size hasn't changed
+          1 data member change:
+           type of 'lttng_event lttng_event_field::event' changed:
+             details were reported earlier
+
+
+  [C]'function int lttng_list_tracepoints(lttng_handle*, lttng_event**)' has some indirect sub-type changes:
+    parameter 2 of type 'lttng_event**' has sub-type changes:
+      in pointed to type 'lttng_event*':
+        pointed to type 'struct lttng_event' changed, as reported earlier
+
+  [C]'function lttng_notification_channel_status lttng_notification_channel_get_next_notification(lttng_notification_channel*, lttng_notification**)' has some indirect sub-type changes:
+    return type changed:
+      type size hasn't changed
+      1 enumerator insertion:
+        'lttng_notification_channel_status::LTTNG_NOTIFICATION_CHANNEL_STATUS_INTERRUPTED' value '2'
+
+    parameter 2 of type 'lttng_notification**' has sub-type changes:
+      in pointed to type 'lttng_notification*':
+        in pointed to type 'struct lttng_notification':
+          type size changed from 192 to 128 (in bits)
+          1 data member deletion:
+            'bool lttng_notification::owns_elements', at offset 128 (in bits)
+
+
+  [C]'function lttng_notification_channel_status lttng_notification_channel_subscribe(lttng_notification_channel*, const lttng_condition*)' has some indirect sub-type changes:
+    return type changed:
+      enum type 'enum lttng_notification_channel_status' changed, as reported earlier
+
+  [C]'function lttng_notification_channel_status lttng_notification_channel_unsubscribe(lttng_notification_channel*, const lttng_condition*)' has some indirect sub-type changes:
+    return type changed:
+      enum type 'enum lttng_notification_channel_status' changed, as reported earlier
+
+  [C]'function void lttng_notification_destroy(lttng_notification*)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_notification*' has sub-type changes:
+      pointed to type 'struct lttng_notification' changed, as reported earlier
+
+  [C]'function const lttng_condition* lttng_notification_get_condition(lttng_notification*)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_notification*' has sub-type changes:
+      pointed to type 'struct lttng_notification' changed, as reported earlier
+
+  [C]'function const lttng_evaluation* lttng_notification_get_evaluation(lttng_notification*)' has some indirect sub-type changes:
+    parameter 1 of type 'lttng_notification*' has sub-type changes:
+      pointed to type 'struct lttng_notification' changed, as reported earlier
+
+  [C]'function filter_parser_ctx* lttng_yyget_extra(yyscan_t)' has some indirect sub-type changes:
+    return type changed:
+      in pointed to type 'struct filter_parser_ctx':
+        type size hasn't changed
+        1 data member change:
+         type of 'filter_ast* filter_parser_ctx::ast' changed:
+           in pointed to type 'struct filter_ast':
+             type size changed from 704 to 768 (in bits)
+             2 data member changes:
+              type of 'filter_node filter_ast::root' changed:
+                type size changed from 576 to 640 (in bits)
+                2 data member changes:
+                 type of 'filter_node* filter_node::parent' changed:
+                   pointed to type 'struct filter_node' changed; details are being reported
+
+                 type of 'union {struct {} unknown; struct {filter_node* child;} root; struct {__anonymous_enum__ type; ast_link_type post_op; ast_link_type pre_op; union {char* string; uint64_t constant; double float_constant; char* identifier; filter_node* child;} u; filter_node* prev; filter_node* next;} expression; struct {op_type type; filter_node* lchild; filter_node* rchild;} op; struct {unary_op_type type; filter_node* child;} unary_op;} filter_node::u' changed:
+                   type size changed from 320 to 384 (in bits)
+                   4 data member changes:
+                    type of 'struct {__anonymous_enum__ type; ast_link_type post_op; ast_link_type pre_op; union {char* string; uint64_t constant; double float_constant; char* identifier; filter_node* child;} u; filter_node* prev; filter_node* next;} expression' changed:
+                      type size changed from 320 to 384 (in bits)
+                      1 data member insertion:
+                        'filter_node* next_bracket', at offset 320 (in bits)
+                      5 data member changes:
+                       type of 'ast_link_type post_op' changed:
+                         type size hasn't changed
+                         1 enumerator insertion:
+                           'ast_link_type::AST_LINK_BRACKET' value '3'
+
+
+                       type of 'ast_link_type pre_op' changed:
+                         details were reported earlier
+
+                       type of 'union {char* string; uint64_t constant; double float_constant; char* identifier; filter_node* child;} u' changed:
+                         type size hasn't changed
+                         1 data member change:
+                          type of 'filter_node* child' changed:
+                            pointed to type 'struct filter_node' changed; details are being reported
+
+                         type changed from:
+                           union {char* string; uint64_t constant; double float_constant; char* identifier; filter_node* child;}
+                         to:
+                           union {char* string; uint64_t constant; double float_constant; char* identifier; filter_node* child;}
+                       type of 'filter_node* prev' changed:
+                         pointed to type 'struct filter_node' changed; details are being reported
+
+                       type of 'filter_node* next' changed:
+                         pointed to type 'struct filter_node' changed; details are being reported
+
+
+                    type of 'struct {op_type type; filter_node* lchild; filter_node* rchild;} op' changed:
+                      type size hasn't changed
+                      3 data member changes:
+                       type of 'op_type type' changed:
+                         type size hasn't changed
+                         5 enumerator deletions:
+                           'op_type::AST_OP_RSHIFT' value '6'
+                           'op_type::AST_OP_LSHIFT' value '7'
+                           'op_type::AST_OP_BIN_AND' value '10'
+                           'op_type::AST_OP_BIN_OR' value '11'
+                           'op_type::AST_OP_BIN_XOR' value '12'
+
+                         5 enumerator insertions:
+                           'op_type::AST_OP_BIT_RSHIFT' value '6'
+                           'op_type::AST_OP_BIT_LSHIFT' value '7'
+                           'op_type::AST_OP_BIT_AND' value '10'
+                           'op_type::AST_OP_BIT_OR' value '11'
+                           'op_type::AST_OP_BIT_XOR' value '12'
+
+
+                       type of 'filter_node* lchild' changed:
+                         pointed to type 'struct filter_node' changed; details are being reported
+
+                       type of 'filter_node* rchild' changed:
+                         pointed to type 'struct filter_node' changed; details are being reported
+
+
+                    type of 'struct {filter_node* child;} root' changed:
+                      type size hasn't changed
+                      1 data member change:
+                       type of 'filter_node* child' changed:
+                         pointed to type 'struct filter_node' changed; details are being reported
+
+
+                    type of 'struct {unary_op_type type; filter_node* child;} unary_op' changed:
+                      type size hasn't changed
+                      2 data member changes:
+                       type of 'unary_op_type type' changed:
+                         type size hasn't changed
+                         1 enumerator deletion:
+                           'unary_op_type::AST_UNARY_BIN_NOT' value '4'
+
+                         1 enumerator insertion:
+                           'unary_op_type::AST_UNARY_BIT_NOT' value '4'
+
+
+                       type of 'filter_node* child' changed:
+                         pointed to type 'struct filter_node' changed; details are being reported
+
+
+
+
+              'cds_list_head filter_ast::allocated_nodes' offset changed from 576 to 640 (in bits) (by +64 bits)
+
+
+  [C]'function YYSTYPE* lttng_yyget_lval(yyscan_t)' has some indirect sub-type changes:
+    return type changed:
+      in pointed to type 'typedef YYSTYPE':
+        underlying type 'union YYSTYPE' changed:
+          type size hasn't changed
+          1 data member change:
+           type of 'filter_node* YYSTYPE::n' changed:
+             pointed to type 'struct filter_node' changed, as reported earlier
+
+          type changed from:
+            union YYSTYPE{long long int ll; char c; gc_string* gs; filter_node* n;}
+          to:
+            union YYSTYPE{long long int ll; char c; gc_string* gs; filter_node* n;}
+  [C]'function void lttng_yyset_extra(filter_parser_ctx*, yyscan_t)' has some indirect sub-type changes:
+    parameter 1 of type 'filter_parser_ctx*' has sub-type changes:
+      pointed to type 'struct filter_parser_ctx' changed, as reported earlier
+
+  [C]'function void lttng_yyset_lval(YYSTYPE*, yyscan_t)' has some indirect sub-type changes:
+    parameter 1 of type 'YYSTYPE*' has sub-type changes:
+      pointed to type 'typedef YYSTYPE' changed, as reported earlier
+
+
+3 Added variables:
+
+  'const char* const mi_lttng_element_command_disable_rotation'
+  'const char* const mi_lttng_element_command_enable_rotation'
+  'const char* const mi_lttng_element_command_rotate'
+
diff --git a/tests/data/test-diff-dwarf/PR25058-liblttng-ctl.so b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl.so
new file mode 100644 (file)
index 0000000..4f8605b
Binary files /dev/null and b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl.so differ
diff --git a/tests/data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so
new file mode 100644 (file)
index 0000000..7c44379
Binary files /dev/null and b/tests/data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so differ
index 016a250..64e5216 100644 (file)
@@ -352,6 +352,12 @@ InOutSpec in_out_specs[] =
     "output/test-diff-dwarf/test46-rust-report-0.txt"
   },
 #endif
+  {
+    "data/test-diff-dwarf/PR25058-liblttng-ctl2.10.so",
+    "data/test-diff-dwarf/PR25058-liblttng-ctl.so",
+    "data/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt",
+    "output/test-diff-dwarf/PR25058-liblttng-ctl-report-1.txt"
+  },
   // This should be the last entry
   {NULL, NULL, NULL, NULL}
 };