Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [patch/but] Fix -Werror probs remote.c, fixes bug
       [not found] <3B000D0F.1080702@cygnus.com>
  2001-05-14 11:05 ` [patch/but] Fix -Werror probs remote.c, fixes bug Michael Snyder
@ 2001-05-14 11:15 ` Kevin Buettner
       [not found]   ` <3B0027F2.C2417CF4@cygnus.com>
  1 sibling, 1 reply; 5+ messages in thread
From: Kevin Buettner @ 2001-05-14 11:15 UTC (permalink / raw)
  To: Michael Snyder, Andrew Cagney, GDB Patches

On May 14, 12:51pm, Andrew Cagney wrote:

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

I've fixed the prototype to match the definition in solib.c.

Michael S: Could I ask you to provide some comments regarding the
purpose of no_shared_libraries()?

Thanks,

Kevin


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

* Re: [patch/but] Fix -Werror probs remote.c, fixes bug
       [not found]   ` <3B0027F2.C2417CF4@cygnus.com>
@ 2001-05-14 13:13     ` Andrew Cagney
  2001-05-14 14:27       ` Michael Snyder
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cagney @ 2001-05-14 13:13 UTC (permalink / raw)
  To: Michael Snyder; +Cc: Kevin Buettner, GDB Patches

To follow up on this,
The reason I wondered about no_shared_library() is because the exported 
function takes two arguments, both of which are ignored.

	Andrew


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

* Re: [patch/but] Fix -Werror probs remote.c, fixes bug
  2001-05-14 13:13     ` Andrew Cagney
@ 2001-05-14 14:27       ` Michael Snyder
  2001-06-13 13:28         ` Andrew Cagney
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Snyder @ 2001-05-14 14:27 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Kevin Buettner, GDB Patches

Andrew Cagney wrote:
> 
> To follow up on this,
> The reason I wondered about no_shared_library() is because the exported
> function takes two arguments, both of which are ignored.

That's to support a user command that also invokes the same function.
If it bothers you, I could export a function with no arguments that
simply invokes the other function which does take arguments (the one
that implements the user command).


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

* Re: [patch/but] Fix -Werror probs remote.c, fixes bug
  2001-05-14 14:27       ` Michael Snyder
@ 2001-06-13 13:28         ` Andrew Cagney
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cagney @ 2001-06-13 13:28 UTC (permalink / raw)
  To: Michael Snyder; +Cc: Kevin Buettner, GDB Patches

> Andrew Cagney wrote:
> 
>> 
>> To follow up on this,
>> The reason I wondered about no_shared_library() is because the exported
>> function takes two arguments, both of which are ignored.
> 
> 
> That's to support a user command that also invokes the same function.
> If it bothers you, I could export a function with no arguments that
> simply invokes the other function which does take arguments (the one
> that implements the user command).


I'd prefer this yes.  The CLI code should just call that same function. 
  I suspect this will be fixed when someone returns to wacking out the CLI.

	Andrew





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

* Re: [patch/but] Fix -Werror probs remote.c, fixes bug
       [not found] <3B000D0F.1080702@cygnus.com>
@ 2001-05-14 11:05 ` Michael Snyder
  2001-05-14 11:15 ` Kevin Buettner
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Snyder @ 2001-05-14 11:05 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: GDB Patches

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


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

end of thread, other threads:[~2001-06-13 13:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3B000D0F.1080702@cygnus.com>
2001-05-14 11:05 ` [patch/but] Fix -Werror probs remote.c, fixes bug Michael Snyder
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox