<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Apr 5, 2013 at 7:40 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":710">(lldb) b PetscFunctionListAdd<br>
Breakpoint 4: no locations (pending).<br>
WARNING: Unable to resolve breakpoint to any actual locations.<br>
(lldb) b PetscFunctionListAdd_Private<br>
Breakpoint 5: where = libpetsc.dylib`PetscFunctionListAdd_Private + 23 at reg.c:173, address = 0x000000010a1d3697</div></blockquote></div><br>The solution to too many macros is always MOAR MACROS!</div><div class="gmail_extra">
<br></div><div class="gmail_extra" style>This is valid:</div><div class="gmail_extra" style><br></div><div class="gmail_extra" style><div class="gmail_extra">PETSC_EXTERN PetscErrorCode PetscFunctionListAdd(PetscFunctionList*,const char[],void (*)(void));</div>
<div>#define PetscFunctionListAdd(list,name,fptr) PetscFunctionListAdd((list),(name),(PetscVoidFunction)(fptr))<br></div><div><br></div><div><br></div><div style>off in the implementation:</div><div style><br></div><div style>
<div style>#undef PetscFunctionListAdd</div><div>PETSC_EXTERN PetscErrorCode PetscFunctionListAdd(PetscFunctionList *fl,const char name[],void (*fnc)(void))</div><div>{</div><div> ...</div><div>}</div><div><br></div><div>
<br></div><div style>This would make the debugging thing work, at the expense of being slightly more confusing to the reader. But maybe comments would be enough to explain what's going on?</div></div></div></div>