public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug shlibs/28236] New: Don't assume r_ldsomap if r_version > 1 in debugger interface
@ 2021-08-16 22:08 hjl.tools at gmail dot com
  2021-08-17  3:31 ` [Bug shlibs/28236] " carlos at redhat dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: hjl.tools at gmail dot com @ 2021-08-16 22:08 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=28236

            Bug ID: 28236
           Summary: Don't assume r_ldsomap if r_version > 1 in debugger
                    interface
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: shlibs
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---

There are

static CORE_ADDR
solib_svr4_r_ldsomap (struct svr4_info *info)
{
  struct link_map_offsets *lmo = svr4_fetch_link_map_offsets ();
  struct type *ptr_type = builtin_type (target_gdbarch ())->builtin_data_ptr;
  enum bfd_endian byte_order = type_byte_order (ptr_type);
  ULONGEST version = 0;

  try
    {
      /* Check version, and return zero if `struct r_debug' doesn't have
         the r_ldsomap member.  */
      version
        = read_memory_unsigned_integer (info->debug_base +
lmo->r_version_offset,
                                        lmo->r_version_size, byte_order);
    }
  catch (const gdb_exception_error &ex)
    {
      exception_print (gdb_stderr, ex);
    }

  if (version < 2 || lmo->r_ldsomap_offset == -1)
    return 0;

  return read_memory_typed_address (info->debug_base + lmo->r_ldsomap_offset,
                                    ptr_type);
}

glibc is planning to bump r_version to support multiple namespaces.  But
there is no r_ldsomap when r_version is bumped to 2.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-17 14:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-16 22:08 [Bug shlibs/28236] New: Don't assume r_ldsomap if r_version > 1 in debugger interface hjl.tools at gmail dot com
2021-08-17  3:31 ` [Bug shlibs/28236] " carlos at redhat dot com
2021-08-17 14:14 ` hjl.tools at gmail dot com
2021-08-17 14:15 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).