mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
Ports/gdb: Fix compiler -fpermissive warnings from using latest GCC
These are compilation errors coming form upstream gdb.
This commit is contained in:
parent
1210ee9ba9
commit
6137b9f272
Notes:
sideshowbarker
2024-07-17 22:00:33 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/6137b9f2725 Pull-request: https://github.com/SerenityOS/serenity/pull/11278
53
Ports/gdb/patches/fix-fpermissive-warnings.patch
Normal file
53
Ports/gdb/patches/fix-fpermissive-warnings.patch
Normal file
@ -0,0 +1,53 @@
|
||||
From 7eeba40e3e8e3be17c68164c44e5ccf76b732842 Mon Sep 17 00:00:00 2001
|
||||
From: Brian Gianforcaro <b.gianfo@gmail.com>
|
||||
Date: Tue, 28 Dec 2021 04:39:25 -0800
|
||||
Subject: [PATCH] serenity: Fix compiler -fpermissive warnings from using
|
||||
latest GCC
|
||||
|
||||
---
|
||||
gdb/inf-ptrace.c | 9 ++++++---
|
||||
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/gdb/inf-ptrace.c b/gdb/inf-ptrace.c
|
||||
index afa38de..247000a 100644
|
||||
--- a/gdb/inf-ptrace.c
|
||||
+++ b/gdb/inf-ptrace.c
|
||||
@@ -288,7 +288,7 @@ inf_ptrace_target::resume (ptid_t ptid, int step, enum gdb_signal signal)
|
||||
where it was. If GDB wanted it to start some other way, we have
|
||||
already written a new program counter value to the child. */
|
||||
errno = 0;
|
||||
- gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, gdb_signal_to_host (signal));
|
||||
+ gdb_ptrace (request, ptid, (PTRACE_TYPE_ARG3)1, (void*)gdb_signal_to_host (signal));
|
||||
if (errno != 0)
|
||||
perror_with_name (("ptrace"));
|
||||
}
|
||||
@@ -312,6 +312,9 @@ inf_ptrace_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
|
||||
{
|
||||
pid = waitpid (ptid.pid (), &status, 0);
|
||||
save_errno = errno;
|
||||
+ fprintf_unfiltered (gdb_stderr,
|
||||
+ _("waitpid(..): %s.\n"),
|
||||
+ safe_strerror (save_errno));
|
||||
}
|
||||
while (pid == -1 && errno == EINTR);
|
||||
|
||||
@@ -388,14 +391,14 @@ inf_ptrace_peek_poke (ptid_t ptid, gdb_byte *readbuf,
|
||||
memcpy (buf.byte + skip, writebuf + n, chunk);
|
||||
errno = 0;
|
||||
gdb_ptrace (PT_WRITE_D, ptid, (PTRACE_TYPE_ARG3)(uintptr_t) addr,
|
||||
- buf.word);
|
||||
+ (void*)buf.word);
|
||||
if (errno != 0)
|
||||
{
|
||||
/* Using the appropriate one (I or D) is necessary for
|
||||
Gould NP1, at least. */
|
||||
errno = 0;
|
||||
gdb_ptrace (PT_WRITE_I, ptid, (PTRACE_TYPE_ARG3)(uintptr_t) addr,
|
||||
- buf.word);
|
||||
+ (void*)buf.word);
|
||||
if (errno != 0)
|
||||
break;
|
||||
}
|
||||
--
|
||||
2.32.0
|
||||
|
Loading…
Reference in New Issue
Block a user