| 73 | }; |
| 74 | |
| 75 | void ClumpletReader::dump() const |
| 76 | { |
| 77 | static int dmp = 0; |
| 78 | gds__log("*** DUMP ***"); |
| 79 | if (dmp) |
| 80 | { |
| 81 | // Avoid infinite recursion during dump |
| 82 | gds__log("recursion"); |
| 83 | return; |
| 84 | } |
| 85 | dmp++; |
| 86 | |
| 87 | try { |
| 88 | ClumpletDump d(kind, getBuffer(), getBufferLength()); |
| 89 | int t = (kind == SpbStart || kind == UnTagged || kind == WideUnTagged || kind == SpbResponse || kind == InfoResponse) ? |
| 90 | -1 : d.getBufferTag(); |
| 91 | gds__log("Tag=%d Offset=%d Length=%d Eof=%d\n", t, getCurOffset(), getBufferLength(), isEof()); |
| 92 | for (d.rewind(); !(d.isEof()); d.moveNext()) |
| 93 | { |
| 94 | gds__log("Clump %d at offset %d: %s", d.getClumpTag(), d.getCurOffset(), |
| 95 | ClumpletDump::hexString(d.getBytes(), d.getClumpLength()).c_str()); |
| 96 | } |
| 97 | } |
| 98 | catch (const fatal_exception& x) |
| 99 | { |
| 100 | gds__log("Fatal exception during clumplet dump: %s", x.what()); |
| 101 | FB_SIZE_T l = getBufferLength() - getCurOffset(); |
| 102 | const UCHAR *p = getBuffer() + getCurOffset(); |
| 103 | gds__log("Plain dump starting with offset %d: %s", getCurOffset(), |
| 104 | ClumpletDump::hexString(p, l).c_str()); |
| 105 | } |
| 106 | dmp--; |
| 107 | } |
| 108 | |
| 109 | } |
| 110 | #endif //DEBUG_CLUMPLETS |
nothing calls this directly
no test coverage detected