public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug server/30453] New: gdbserver cannot set breakpoints when  /proc/pid/mem is not writable
@ 2023-05-16 16:00 manojgupta at google dot com
  2023-05-16 16:02 ` [Bug server/30453] " manojgupta at google dot com
                   ` (28 more replies)
  0 siblings, 29 replies; 30+ messages in thread
From: manojgupta at google dot com @ 2023-05-16 16:00 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 30453
           Summary: gdbserver cannot set breakpoints when  /proc/pid/mem
                    is not writable
           Product: gdb
           Version: HEAD
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: server
          Assignee: unassigned at sourceware dot org
          Reporter: manojgupta at google dot com
  Target Milestone: ---

In ChromeOS, we upgraded recently to gdb 13.1. Users are now reporting that
remote debugging using gdbserver now does not work as breakpoints can not be
set.

the error looks like:

# gdb
GNU gdb (Chromium OS 13.1 vanilla) 13.1
(gdb) target remote :1234
Remote debugging using :1234

0x0000007ff7fda920 in _start () from target:/lib/ld-linux-aarch64.so.1
(gdb) b main
Breakpoint 1 at 0x5555550770: file hello.c, line 4.
(gdb) n
Single stepping until exit from function _dl_start,
which has no line number information.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x5555550770

Command aborted.

The debugging used to work in gdb 11.2 and 12.1.
I bisected  the problem to the following commit:
commit 421490af33bfbfe8a8429f0e43fb3e9f8727476e
Author: Pedro Alves <pedro@palves.net>
Date:   Mon Mar 28 18:35:34 2022 +0100

    gdbserver/linux: Access memory even if threads are running


Looks like it needs a fix up when /proc/pid/mem is not writable similar to
local debugging  patch:

commit dd09fe0d53242a5f6a86d2822b0cfdeb3f5baa8f
Author: Keith Seitz <keiths@redhat.com>
Date:   Tue Jul 26 19:11:04 2022 +0100

    gdb/linux_nat: Write memory using ptrace if /proc/pid/mem is not writable

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

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

end of thread, other threads:[~2024-02-23 17:01 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16 16:00 [Bug server/30453] New: gdbserver cannot set breakpoints when /proc/pid/mem is not writable manojgupta at google dot com
2023-05-16 16:02 ` [Bug server/30453] " manojgupta at google dot com
2023-05-16 18:17 ` pedro at palves dot net
2023-05-16 18:24 ` manojgupta at google dot com
2023-05-16 20:00 ` pedro at palves dot net
2023-05-16 20:13 ` manojgupta at google dot com
2023-05-17 19:03 ` manojgupta at google dot com
2023-05-18 11:50 ` pedro at palves dot net
2024-02-15 19:06 ` adrian.ratiu at collabora dot com
2024-02-15 19:07 ` adrian.ratiu at collabora dot com
2024-02-15 19:07 ` adrian.ratiu at collabora dot com
2024-02-15 19:13 ` adrian.ratiu at collabora dot com
2024-02-15 20:09 ` pedro at palves dot net
2024-02-15 20:18 ` pedro at palves dot net
2024-02-15 20:18 ` pedro at palves dot net
2024-02-16  2:54 ` tromey at sourceware dot org
2024-02-16  5:29 ` adrian.ratiu at collabora dot com
2024-02-16  5:40 ` adrian.ratiu at collabora dot com
2024-02-16  9:47 ` adrian.ratiu at collabora dot com
2024-02-16 17:33 ` tromey at sourceware dot org
2024-02-16 17:53 ` pedro at palves dot net
2024-02-16 17:56 ` pedro at palves dot net
2024-02-16 18:10 ` adrian.ratiu at collabora dot com
2024-02-16 18:17 ` pedro at palves dot net
2024-02-16 20:53 ` mark at klomp dot org
2024-02-16 21:36 ` pedro at palves dot net
2024-02-16 21:38 ` pedro at palves dot net
2024-02-16 21:57 ` tromey at sourceware dot org
2024-02-22 13:28 ` adrian.ratiu at collabora dot com
2024-02-23 17:01 ` cvs-commit at gcc dot gnu.org

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).