🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Bryan Boreham Sun, 17 Sep 1989 14:35
read_memory bug
#259
Author: Bryan Boreham
Date: Sun, 17 Sep 1989 14:35
24 lines
923 bytes
This code in core.c contains an error:

int
read_memory (memaddr, myaddr, len)
     CORE_ADDR memaddr;
     char *myaddr;
     int len;
{
  if (len == 0)
    return;	<---- return what?

  if (have_inferior_p ())
      return read_inferior_memory (memaddr, myaddr, len);
  else
      return xfer_core_file (memaddr, myaddr, len);
}


I'd say it should return 0.

This sometimes causes gdb to report that ptrace got an "unknown error"
when you try to print *p when p is declared like "struct foobar *p;".

Bryan.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads