From: Pedro Alves <palves@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org, stan@codesourcery.com
Subject: Re: [commit] fix gdbserver build failure on amd64-linux
Date: Mon, 02 Jul 2012 17:29:00 -0000 [thread overview]
Message-ID: <4FF1DA50.6020704@redhat.com> (raw)
In-Reply-To: <20120702171241.5E9E11E1392@ruffy2.mtv.corp.google.com>
On 07/02/2012 06:12 PM, Doug Evans wrote:
> Hi.
>
> fyi, I committed this.
>
> 2012-07-02 Doug Evans <dje@google.com>
>
> * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
> pointer to int.
>
> Index: mem-break.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/gdbserver/mem-break.c,v
> retrieving revision 1.34
> diff -u -p -r1.34 mem-break.c
> --- mem-break.c 2 Jul 2012 15:29:38 -0000 1.34
> +++ mem-break.c 2 Jul 2012 17:10:13 -0000
> @@ -22,6 +22,7 @@
> #include "server.h"
> #include "regcache.h"
> #include "ax.h"
> +#include <stdint.h>
>
> const unsigned char *breakpoint_data;
> int breakpoint_len;
> @@ -929,8 +930,8 @@ gdb_no_commands_at_breakpoint (CORE_ADDR
> return 0;
>
> if (debug_threads)
> - fprintf (stderr, "at 0x%s, bp command_list is 0x%x\n",
> - paddress (where), (int) bp->command_list);
> + fprintf (stderr, "at 0x%s, bp command_list is 0x%lx\n",
> + paddress (where), (long) (uintptr_t) bp->command_list);
That's not correct on e.g., Win64, where sizeof long < sizeof pointer.
The right fix is to either use host_address_to_string, or %p, if acceptable
on all hosts.
> return (bp->command_list == NULL);
> }
>
>
--
Pedro Alves
next prev parent reply other threads:[~2012-07-02 17:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 17:12 Doug Evans
2012-07-02 17:29 ` Pedro Alves [this message]
2012-07-02 17:41 ` Tom Tromey
2012-07-02 17:57 ` Stan Shebs
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=4FF1DA50.6020704@redhat.com \
--to=palves@redhat.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=stan@codesourcery.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