From: Michal Ludvig <mludvig@suse.cz>
To: gdb-patches@sources.redhat.com
Cc: Daniel Jacobowitz <drow@mvista.com>
Subject: [RFA] gdbserver warnings
Date: Wed, 24 Apr 2002 05:04:00 -0000 [thread overview]
Message-ID: <3CC69F25.3040704@suse.cz> (raw)
[-- Attachment #1: Type: text/plain, Size: 880 bytes --]
Hi,
Now only two simple issues things in gdbserver to compile cleanly. First
patch prevents:
linux-low.c: In function `regsets_store_inferior_registers':
linux-low.c:424: warning: cast from pointer to integer of different size
on x86-64 where sizeof(void*) != sizeof(int). Why did you cast the last
argument from pointer to integer? Manpage says it should be a void*...
But I didn't test it on other archs...
The second one prevents:
regcache.h:26: warning: `struct inferior_info' declared inside parameter
list
2002-04-24 Michal Ludvig <mludvig@suse.cz>
* gdbserver/linux-low.c (regsets_fetch_inferior_registers),
(regsets_store_inferior_registers): Removed cast to int from
ptrace() calls.
* gdbserver/regcache.h: Include server.h.
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* +420 2 9654 5373 * http://www.suse.cz
[-- Attachment #2: gdbserver1.diff --]
[-- Type: text/plain, Size: 1695 bytes --]
Index: linux-low.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/linux-low.c,v
retrieving revision 1.15
diff -c -3 -p -r1.15 linux-low.c
*** linux-low.c 20 Apr 2002 17:04:09 -0000 1.15
--- linux-low.c 24 Apr 2002 11:53:52 -0000
*************** regsets_fetch_inferior_registers (void)
*** 372,378 ****
}
buf = malloc (regset->size);
! res = ptrace (regset->get_request, inferior_pid, 0, (int) buf);
if (res < 0)
{
if (errno == EIO)
--- 372,378 ----
}
buf = malloc (regset->size);
! res = ptrace (regset->get_request, inferior_pid, 0, buf);
if (res < 0)
{
if (errno == EIO)
*************** regsets_store_inferior_registers (void)
*** 421,427 ****
buf = malloc (regset->size);
regset->fill_function (buf);
! res = ptrace (regset->set_request, inferior_pid, 0, (int) buf);
if (res < 0)
{
if (errno == EIO)
--- 421,427 ----
buf = malloc (regset->size);
regset->fill_function (buf);
! res = ptrace (regset->set_request, inferior_pid, 0, buf);
if (res < 0)
{
if (errno == EIO)
Index: regcache.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbserver/regcache.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 regcache.h
*** regcache.h 20 Apr 2002 17:22:48 -0000 1.3
--- regcache.h 24 Apr 2002 11:53:52 -0000
***************
*** 21,26 ****
--- 21,28 ----
#ifndef REGCACHE_H
#define REGCACHE_H
+ #include <server.h>
+
/* Create a new register cache for INFERIOR. */
void create_register_cache (struct inferior_info *inferior);
next reply other threads:[~2002-04-24 12:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-24 5:04 Michal Ludvig [this message]
2002-04-24 7:22 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3CC69F25.3040704@suse.cz \
--to=mludvig@suse.cz \
--cc=drow@mvista.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox