It's bound to debugger's CPU not debuggee's.
We should eventually get rid of dbghelp_current_cpu, but
but that can wait after 8.0 (mainly in minidump.c).
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1999
## Summary
Tests for UrlFixupW and semi stub function implementaion.
## Test results
- Tests are 100% ok on my local WIN 10 pc. Wine test bot seems to be okay too.
- Wine tests on debian machine
| function type | result |
| ------ | ------ |
| stub | 0020:url: 69802 tests executed (0 marked as todo, 0 as flaky, **200** failures), 0 skipped. |
| semi stub| 0020:url: 69802 tests executed (0 marked as todo, 0 as flaky, **100** failures), 0 skipped. |
## Todos
For follow up merge request(s).
- [ ] Add more tests for priority investigation, who url scheme fix up is working on windows.
- [ ] Implement missing parts of fix up.
## Conclusion
Semi stub implementation is an improvement to the existing solution. A grep showed that wine internals do not call this function, therefore it should not introduce any new bugs. Windows applications using/relying on the function should now work better, if not they may reveal already existing bugs.
--
v4: shlwapi: fixup leading and trailing typos in UrlFixupW
shlwapi: check for colon in UrlFixupW
kernelbase: Restructure UrlFixupW()
shlwapi/tests: Add tests for UrlFixupW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825
On Sun Jan 22 22:25:54 2023 +0000, Thomas Csovcsity wrote:
> Sure, that it can be done. Other parts of the code use goto too. I also
> used already goto in kernel and drivers. ATM i am not able to think
> about a function which would make it easier. If i use early return from
> function, i think it makes no difference, but i plan to use a helper
> function to keep UrlFixup shorter. Any suggestion about the structure is
> well come, because i think i am blind to other and better ways.
It's not cargo-cult avoidance of goto (although in general I think there are only a few situations where it's the most idiomatic choice), but I think using a helper is a lot more readable in patterns like this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_21345
On Sun Jan 22 22:25:54 2023 +0000, Thomas Csovcsity wrote:
> source does not have wmemcpy and wcsncpy is defined as:
> `#define wcsncpy(d,s,n) error do_not_use_wcsncpy_use_lstrcpynW_or_memcpy_instead`
In this case you'd write "memcpy(save_str, url_scheme[pos], (len + 1) * sizeof(WCHAR))".
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_21344
On Sun Dec 18 23:32:22 2022 +0000, Zebediah Figura wrote:
> We use WCHAR, not wchar_t.
> It'd also be nice to use a consistent style for all of variable names in
> this function (wrt snake case vs camel case). In new code I think we
> prefer snake case.
Okay
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_21342
On Sun Dec 18 23:32:22 2022 +0000, Zebediah Figura wrote:
> Can we use a helper function to fix up the scheme instead of using a
> goto? This will probably also help make the function easier to follow,
> by virtue of being less monolithic.
Sure, that it can be done. Other parts of the code use goto too. I also used already goto in kernel and drivers. ATM i am not able to think about a function which would make it easier. If i use early return from function, i think it makes no difference, but i plan to use a helper function to keep UrlFixup shorter. Any suggestion about the structure is well come, because i think i am blind to other and better ways.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_21341