Macaulay2 Engine
Loading...
Searching...
No Matches
debug.hpp File Reference

Debugger-callable d* helpers that pretty-print engine values to stderr. More...

#include "ringelem.hpp"

Go to the source code of this file.

Functions

void showint (mpz_srcptr a)
void dmatrix (const Matrix *M)
void drelem (const RingElement *f)
void dfree (const FreeModule *F)
void dringelem (const Ring *R, const ring_elem f)
void dNterm (const Ring *R, const Nterm *f)
void dvec (const Ring *R, const vec v)
void dgbvec (const GBRing *R, gbvector *v)
void drespoly (const res_poly *R, const resterm *f)
void drespoly2 (const res2_poly *R, const res2term *f)
void dmutablemat (MutableMatrix *m)
void dmonideal (MonomialIdeal *m)
void dintarray (M2_arrayint a)
template<typename T>
void dvector (gc_vector< T > &a)
void dstash ()
void dRRR (gmp_RR a)
void pring (const Ring *R)

Detailed Description

Debugger-callable d* helpers that pretty-print engine values to stderr.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares short-named global functions — dmatrix, drelem, dfree, dringelem, dNterm, dvec, dgbvec, drespoly / drespoly2, dmutablemat, dmonideal, dintarray, dvector, dstash, dRRR, pring, showint — that print engine objects in a form readable from gdb or lldb. The implementations typically format into a local buffer and flush it via emit(o.str()) (defined in text-io.hpp), which writes to stderr. Most of the pointer-taking helpers are declared extern "C" so the debugger can call them by an unmangled name from a stopped frame.

The functions exist alongside each class's own text_out(buffer&) because they take only opaque pointers (so any stack frame can use them, even one that has no buffer available) and they flush immediately rather than leaving the formatted text inside a caller-owned buffer. The breadth of forward declarations is intentional — every printable engine type is forward-declared rather than included so the header stays cheap to pull in.

See also
buffer.hpp
text-io.hpp

Definition in file debug.hpp.