Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@cygnus.com>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: GDB Patches <gdb-patches@sourceware.cygnus.com>
Subject: Re: [patch/but] Fix -Werror probs remote.c, fixes bug
Date: Mon, 14 May 2001 11:05:00 -0000	[thread overview]
Message-ID: <3B001E57.B3EBF534@cygnus.com> (raw)
In-Reply-To: <3B000D0F.1080702@cygnus.com>

Andrew Cagney wrote:
> 
> Hello,
> 
> The attatched fixes -Werror -Wuninitialized -Wimplict compile errors
> that were recently introduced to remote.c.
> 
> In the case of nr_bytes, the -Werror -Wuninitialized flag was
> identifying a real bug. nr_bytes could be returned uninitialied and that
> bogus value could have easily hossed the caller.
> 
> For the extern I'm adding to solib.h, I'm kind of wondering if that is
> the correct interface.  Kevin?  Feel free to clean up that exported
> function.
> 
>         Andrew
> 
>   ----------------------------------------------------------------------------------------------------
> 2001-05-14  Andrew Cagney  <ac131313@redhat.com>
> 
>         * remote.c (remote_write_bytes): Set nr_bytes before returning it.
>         * solib.h (no_shared_libraries): Declare.
> 
> Index: remote.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/remote.c,v
> retrieving revision 1.49
> diff -p -r1.49 remote.c
> *** remote.c    2001/05/10 19:06:19     1.49
> --- remote.c    2001/05/14 16:45:01
> *************** remote_write_bytes (CORE_ADDR memaddr, c
> *** 3630,3635 ****
> --- 3630,3636 ----
>          increasing byte addresses.  Each byte is encoded as a two hex
>          value.  */
>         bin2hex (myaddr, p, todo);
> +       nr_bytes = todo;

This should be:
	  nr_bytes = bin2hex (myaddr, p, todo);


>         break;
>       case PACKET_SUPPORT_UNKNOWN:
>         internal_error (__FILE__, __LINE__,
> Index: solib.h
> ===================================================================
> RCS file: /cvs/src/src/gdb/solib.h,v
> retrieving revision 1.4
> diff -p -r1.4 solib.h
> *** solib.h     2001/03/06 08:21:17     1.4
> --- solib.h     2001/05/14 16:45:01
> *************** extern char *solib_address (CORE_ADDR);
> *** 193,195 ****
> --- 193,197 ----
>   #define IN_SOLIB_DYNSYM_RESOLVE_CODE(pc) in_solib_dynsym_resolve_code (pc)
> 
>   extern int in_solib_dynsym_resolve_code (CORE_ADDR);  /* solib.c */
> +
> + extern int no_shared_libraries (char *ignored, int from_tty);

I'm going to add this prototype to solib.h.

Michael


       reply	other threads:[~2001-05-14 11:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3B000D0F.1080702@cygnus.com>
2001-05-14 11:05 ` Michael Snyder [this message]
2001-05-14 11:15 ` Kevin Buettner
     [not found]   ` <3B0027F2.C2417CF4@cygnus.com>
2001-05-14 13:13     ` Andrew Cagney
2001-05-14 14:27       ` Michael Snyder
2001-06-13 13:28         ` Andrew Cagney

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=3B001E57.B3EBF534@cygnus.com \
    --to=msnyder@cygnus.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sourceware.cygnus.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