Fresh IDE . Check-in [6bf473646c]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:More detailed dump of segmentation faults.
Timelines: family | ancestors | descendants | both | FreshLibDev
Files: files | file ages | folders
SHA1:6bf473646c3921222496ace470b83cf0bef9d228
User & Date: johnfound 2018-11-10 11:50:14
Context
2018-11-11
19:27
Fixed bug in the MiniMag parser. check-in: 552661a932 user: johnfound tags: FreshLibDev
2018-11-10
11:50
More detailed dump of segmentation faults. check-in: 6bf473646c user: johnfound tags: FreshLibDev
2018-11-08
09:48
Changes in bbcode.asm in order to make it compatible with the developed markdown compatible parser. check-in: 1c0a2da404 user: johnfound tags: FreshLibDev
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to freshlib/system/Linux/process.asm.

224
225
226
227
228
229
230










231
232
233
234
235
236
237
238






















239
240
241
242
243
244
245
        popad
        return
endp



if used __ExceptionHandler











__ExceptionHandler:

        lea     esi, [esp+8]    ; the start of sig_context structure.

        stdcall FileOpenAccess, "fault.txt", faCreateAlways or faWriteOnly
        mov     ebx, eax























        mov     eax, [esi+sig_context.eip]

        stdcall NumToStr, eax, ntsHex or ntsUnsigned or ntsFixedWidth + 8
        stdcall FileWriteString, ebx, eax
        stdcall FileWriteString, ebx, <txt 13, 10, 13, 10>

        lea     ebp, [esi+sig_context.ebp]







>
>
>
>
>
>
>
>
>
>








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
        popad
        return
endp



if used __ExceptionHandler

__reg_names db  'eax', sig_context.eax
            db  'ebx', sig_context.ebx
            db  'ecx', sig_context.ecx
            db  'edx', sig_context.edx
            db  'esi', sig_context.esi
            db  'edi', sig_context.edi
            db  'ebp', sig_context.ebp
            db  'esp', sig_context.esp
            dd  0

__ExceptionHandler:

        lea     esi, [esp+8]    ; the start of sig_context structure.

        stdcall FileOpenAccess, "fault.txt", faCreateAlways or faWriteOnly
        mov     ebx, eax

; Write the registers to the file:

        mov     edi, __reg_names

.reg_loop:
        cmp     byte [edi], 0
        je      .dump_stack

        stdcall FileWrite, ebx, edi, 3
        stdcall FileWrite, ebx, txt " = ", 3

        movzx   eax, byte [edi+3]
        stdcall NumToStr, [esi + eax], ntsHex or ntsUnsigned or ntsFixedWidth + 8
        stdcall FileWriteString, ebx, eax
        stdcall FileWriteString, ebx, <txt 13, 10>
        add     edi, 4
        jmp     .reg_loop

; Write the stack backtrace to the file:

.dump_stack:
        stdcall FileWriteString, ebx, <txt 13, 10>
        mov     eax, [esi+sig_context.eip]

        stdcall NumToStr, eax, ntsHex or ntsUnsigned or ntsFixedWidth + 8
        stdcall FileWriteString, ebx, eax
        stdcall FileWriteString, ebx, <txt 13, 10, 13, 10>

        lea     ebp, [esi+sig_context.ebp]