| 144 | } |
| 145 | |
| 146 | void fxBufferFunctionNameAddress(txMachine* the, txString buffer, txSize size, txID id, txCallback address, txID profileID) |
| 147 | { |
| 148 | txInteger length; |
| 149 | if (id != XS_NO_ID) { |
| 150 | txBoolean adorn; |
| 151 | txString string = fxGetKeyString(the, id, &adorn); |
| 152 | if (adorn) |
| 153 | c_strncat(buffer, "[", size - mxStringLength(buffer) - 1); |
| 154 | fxBufferName(buffer, string, size - mxStringLength(buffer) - 1); |
| 155 | if (adorn) |
| 156 | c_strncat(buffer, "]", size - mxStringLength(buffer) - 1); |
| 157 | return; |
| 158 | } |
| 159 | if (address) { |
| 160 | c_strncat(buffer, "@", size - mxStringLength(buffer) - 1); |
| 161 | #if mxMacOSX || mxLinux |
| 162 | Dl_info info; |
| 163 | if (dladdr(address, &info) && info.dli_sname) |
| 164 | c_strncat(buffer, info.dli_sname, size - mxStringLength(buffer) - 1); |
| 165 | else |
| 166 | #endif |
| 167 | { |
| 168 | c_strncat(buffer, "anonymous-", size - mxStringLength(buffer) - 1); |
| 169 | length = mxStringLength(buffer); |
| 170 | fxIntegerToString(the, profileID, buffer + length, size - length - 1); |
| 171 | } |
| 172 | } |
| 173 | else { |
| 174 | c_strncat(buffer, "(anonymous-", size - mxStringLength(buffer) - 1); |
| 175 | length = mxStringLength(buffer); |
| 176 | fxIntegerToString(the, profileID, buffer + length, size - length - 1); |
| 177 | c_strncat(buffer, ")", size - mxStringLength(buffer) - 1); |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | void fxBufferObjectName(txMachine* the, txString buffer, txSize size, txSlot* object, txString suffix) |
| 182 | { |
no test coverage detected