Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
88 user(s) are online (75 user(s) are browsing Forums)

Members: 1
Guests: 87

samo79, more...

Support us!

Headlines

Report message:*
 

Re: GDB

Subject: Re: GDB
by billyfish on 2021/3/23 17:44:30

Thanks guys, I still haven't managed to get the breakpoints working, grr! Roman, can you remember when we did we have breakpoints working? If we did, then that will give me a base to compare to.

The helloworld example doesn't crash for me but the breakpoints don't work. For example

#include <stdio.h>

int main (void)
{
  
printf ("hello worldn");

  return 
0;
}


Runs without crashing but any breakpoints just get ignored.

I've uploaded some updates which that to deal with the debug messages sent by our hook function. For instance,

#include <stdio.h>

int main (void)
{
  
int *i_p NULL;

  
printf ("here comes the crash...n");

  
/* BOOM! */
  
*i_p 9;

  return 
0;
}


will now get caught by gdb, though you can't inspect the variables, etc. yet. So that needs adding too. Hopefully the code from https://github.com/alfkil/Spotless/blo ... r/SimpleDebug/Symbols.cpp will give that to us.

If you look at lines 96-109 of amigaos-nat.c, there are two new flags to adjust which functions get used by our target

/*
 * If this is TRUE, then the breakpoint code based upon Spotless
 * is used. If this is FALSE, then the breakpoint code based upon
 * the old gdb 6.3 port is used instead.
 */
static const BOOL s_use_spotless_breakpoints_flag FALSE;

/*
 * If this is TRUE, then the memory transfer routine from the old
 * gdb 6.3 port is used. If this is FALSE, then the code uses the
 * new partial_mem_transfer API with amigaos_xfer_partial ()
 * instead.
 */
static const BOOL s_use_deprecated_mem_transfer_flag TRUE;


So still more to do but hopefully the breakpoints will work soon!

Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project