Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)
| От | Euler Taveira | 
|---|---|
| Тема | Re: [PATCH] Add Windows support for backtrace_functions (MSVC only) | 
| Дата | |
| Msg-id | 7379da2a-10e1-4fb2-bd77-212daf4b00b8@app.fastmail.com обсуждение исходный текст  | 
		
| Ответ на | Re: [PATCH] Add Windows support for backtrace_functions (MSVC only) (Bryan Green <dbryan.green@gmail.com>) | 
| Ответы | 
                	
            		Re: [PATCH] Add Windows support for backtrace_functions (MSVC only)
            		
            		 | 
		
| Список | pgsql-hackers | 
On Mon, Oct 27, 2025, at 2:58 PM, Bryan Green wrote: > Thanks for even glancing at this. I did not add any regression > tests because the output goes to the server log and not the client. > Since Michael said WIN32-specific tests and mentioned log pattern, he is referring to TAP tests. You can add src/test/modules/test_backtrace that exercises this code path. I didn't test your patch but I'm wondering if we could add an abstraction here. I mean invent pg_backtrace() and pg_backtrace_symbols() that maps to the current functions (Unix-like). On Windows these functions are mapped to win32_backtrace() (that encapsulates CaptureStackBackTrace()) and a new win32_backtrace_symbols() (that encapsulates the rest of the code). There Windows-specific functions should be added to src/port -- my suggestion is win32backtrace.c. Besides that you have to adjust backtrace_symbols in both configure.ac and meson.build so it runs the code path inside HAVE_BACKTRACE_SYMBOLS. -- Euler Taveira EDB https://www.enterprisedb.com/
В списке pgsql-hackers по дате отправления: