JochenKalmbach / StackWalker

Walking the callstack in windows applications
BSD 2-Clause "Simplified" License
831 stars 182 forks source link

Adding Unicode support #35

Closed OfekShilon closed 4 months ago

OfekShilon commented 5 years ago

In response to both my need and a reported issue.

SirLynix commented 3 years ago

@JochenKalmbach Do you plan to merge this PR sometimes? I can make a new one if this one is too outdated, having Unicode support would be a plus for this library 😃

emmenlau commented 3 years ago

@JochenKalmbach Do you plan to merge this PR sometimes? I can make a new one if this one is too outdated, having Unicode support would be a plus for this library

Yes, Unicode support would be great!

JochenKalmbach commented 3 years ago

Currentl the main problem is that you removed several defined which are needed for VC6... so I am not sure if this is ok or not... Also the definition of DBGHELP_TRANSLATE_TCHAR should be depended on the SDK version...

OfekShilon commented 3 years ago

@JochenKalmbach This PR was made almost exactly 2 years ago - I'm currently working only on linux and would have a hard time going back to this. Feel free to modify it in any way you see fit. Edit: Also, I think it is very safe to drop VC6 in 2021.

remittor commented 1 year ago

Fork with fully Unicode support: https://github.com/remittor/StackWalker

equalman commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

luzpaz commented 4 months ago

bump

JochenKalmbach commented 4 months ago

As said... for older OSes/SDKs there was NO Unicode-version of dbghelp.dll available... so changing this now would break the execution of this on such systems, because it would now assume that a wchar_t version would be there... (if the programis compßiler with unicode)...

SirLynix commented 4 months ago

How about dropping support for the 20th century?

Like seriously, admitting there are still a relevant number of computers running on Windows 95 and depending on this library today, why not embrace the "future"? VC 8.0 got out almost twenty years ago.

Make a "legacy" branch to be able to bring back fixes if required (let's recall there hasn't been any commit for more than two years until recently) and add unicode on the master branch.

luzpaz commented 4 months ago

+1 for legacy branch

remittor commented 4 months ago

for older OSes/SDKs there was NO Unicode-version of dbghelp.dll available... so changing this now would break the execution of this on such systems, because it would now assume that a wchar_t version would be there... (if the programis compßiler with unicode)...

I solved this problem this way: https://github.com/remittor/StackWalker/blob/44931fec8e985ef4720e722f5f4bc4ccce2b54c5/src/StackWalker.cpp#L741-L755

#if !defined(STKWLK_ANSI) && API_VERSION_NUMBER < 11
#error "For Unicode support required update the Windows Platform SDK to v6.0 or later"
#endif

Make a "legacy" branch to be able to bring back fixes if required (let's recall there hasn't been any commit for more than two years until recently) and add unicode on the master branch.

My fork https://github.com/remittor/StackWalker support WinXP and VC6 compiler (Win9X not support).