<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Ken,<div><br><div class="gmail_quote"><div dir="ltr">On Fri, Dec 7, 2018 at 1:23 PM Ken.Dickey <<a href="mailto:Ken.Dickey@whidbey.com">Ken.Dickey@whidbey.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Greetings,<br>
<br>
I am grepping around to find the source of<br>
<br>
 ..In function sqUnixMain.c: In function 'sigsegv':<br>
include_ucontext.h:48:37: error 'mcontext_t'<br>
  has no member 'arm_pc'<br>
<br>
I note in <br>
 /usr/include/aarch64_linux_gnu/asm/sigcontext.h member 'pc' but not 'arm_pc'<br>
<br>
I am guessing this is from the include_ucontext.h line <br>
  #elif __linux__ && __arm__<br>
<br>
Where do I set/override __arm__ with (__aarch64__ or __armv8-a__ or __arm64__) ?<br>
<br>
What is the preferred __*__ to use?<br></blockquote><div><br></div><div>Use all those that commonly apply. For example look at spur64src/vm/cogit.c which attempts to include either cogitX64SysV.c or cogitX64WIN64.c depending on whether the system, is an x86_64 and whether this is SysV or _WIN64.  These use the following defines to see if the platform is x86_64:</div><div><br></div><div>defined(x86_64) || defined(__amd64) || defined(__x86_64) || defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64) || defined(_M_X64)<br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
Any way to debug this cr*p?  Trace flag?  Dump defines (here)? <br></blockquote><div><br></div><div>There are two ways.  One is dumping the predefined macros, see e.g. <a href="https://stackoverflow.com/questions/2224334/gcc-dump-preprocessor-defines">https://stackoverflow.com/questions/2224334/gcc-dump-preprocessor-defines</a>. For gcc (and clang) this is</div><div><br></div><div>$ gcc -dM -E - </dev/null<br></div><div><br></div><div>The other essential debugging technique is to use -E or -P on the command-line.  -E dumps the preprocessed output to stdout.  -P dumps it to foo.i if preprocessing foo.c</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Thanks much,<br></blockquote><div><br></div><div>It's a bit like diving into icy cold water.  Horrible when you first enter but fortifying in the long run, providing it doesn't give you a heart attack then and there.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
-KenD<br>
_______________________________________________<br>
VM-beginners mailing list<br>
<a href="mailto:VM-beginners@lists.squeakfoundation.org" target="_blank">VM-beginners@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners" rel="noreferrer" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/vm-beginners</a></blockquote><div> </div></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><span style="font-size:small;border-collapse:separate"><div>_,,,^..^,,,_<br></div><div>best, Eliot</div></span></div></div></div></div></div></div></div></div></div></div></div>