Commit Graph

25 Commits

Author SHA1 Message Date
chss95cs@gmail.com
7e58a3b320 Fix compiler errors i introduced under clang-cl
remove xe_kernel_export_shim_fn field of Export function_data, trampoline is now the only way exports get invoked
Remove kernelstate argument from string functions in order to conform to the trampoline signature (the argument was unused anyway)
Constant-evaluated initialization of ppc_opcode_disasm_table, removal of unused std::vector fields
Constant-evaluated initialization of export tables
name field on export is just a const char* now, only immutable static strings are ever passed to it
Remove unused callcount field of export.
PM4 compare op function extracted
Globally apply /Oy, /GS-, /Gw on msvc windows
Remove imgui testwindow code call, it took up like 300 kb
2022-09-29 07:04:17 -07:00
Gliniak
3a115ae6a0 [Kernel] Restored usage of: log_string_format_kernel_calls 2022-04-14 13:48:24 -05:00
gibbed
3ad0a7dab2 [Kernel] Suffix export functions with _entry. 2022-01-09 12:17:03 -06:00
Gliniak
d6660ac391 [Kernel] Added %L to formatter 2021-10-14 15:05:12 -05:00
Triang3l
6241b4f907 [Kernel] stringstream<< > string.push_back as LLVM libc++ doesn't support char16_t stream 2021-09-12 13:04:03 +03:00
gibbed
fb0c354b2f [xboxkrnl] Trim DbgPrint messages. 2021-06-28 20:32:52 -05:00
gibbed
ead4818e25 [xboxkrnl] Optional string formatter logging. 2021-06-28 20:32:52 -05:00
gibbed
e84ef132ae [xboxkrnl] Log strings for string formatters. 2021-06-28 20:32:52 -05:00
gibbed
8caf8d1c1d [xboxkrnl] Upgrade DbgPrint logs to info. 2021-06-28 20:32:52 -05:00
gibbed
fe016cc60c [Kernel] Fix vswprintf debug log. 2020-04-09 17:54:22 -05:00
gibbed
a48bb71c2f Overhaul logging. 2020-04-07 16:09:41 -05:00
gibbed
5bf0b34445 C++17ification.
C++17ification!

- Filesystem interaction now uses std::filesystem::path.
- Usage of const char*, std::string have been changed to
  std::string_view where appropriate.
- Usage of printf-style functions changed to use fmt.
2020-04-07 16:09:41 -05:00
emoose
9185cdcc79 [Kernel] Fix wide-printf functions not processing %ws format correctly
This would break format strings like memory://%.*ws (that dashboard tries using), because the "ws" part would set FF_IsWide, but FF_IsWide actually seemed to be used as an "is opposite encoding" flag.
Since the format string is wide that'd make it treat the param as ASCII, but in dashboards case the param string provided is actually a wide string.
(in other words, it seems %ws is supposed to mean that the param is always a wide string, not that the param is just opposite encoding)

This changes the old FF_IsWide to FF_InvertWide, and adds a new FF_IsWide that means that the param is always wide.
2020-02-24 14:58:09 -06:00
emoose
ac5d548e90 [Kernel] *FormatData: make peek() match get() endian, fix skip() not advancing pointer 2020-02-24 14:58:09 -06:00
gibbed
a6e6f0f7bf Lint cleanup. 2020-02-22 13:29:07 -06:00
emoose
65e8872dc1 [Kernel] Add _vsnwprintf export 2018-11-23 16:38:34 -06:00
Dr. Chat
c95ba803a8 Merge branch 'xexp' 2018-10-28 12:20:02 -05:00
emoose
67f0e487f4 [Kernel] Fix _snwprintf not having format_core wide = true 2018-10-22 18:00:01 +01:00
emoose
0b7f7e1657 [CPU] Move XEX2 code into XexModule class, autodetect XEX key
Code is mainly just copy/pasted from kernel/util/xex2.cc, I've tried fixing it up to work better in a class, but there's probably some things I missed.

Also includes some minor improvements to the XEX loader, like being able to try both XEX keys (retail/devkit) automatically, and some fixes to how the base address is determined.

(Previously there was code that would get base address from optional header, code that'd get it from xex_security_info, code that'd use a stored base address value...
Now everything reads it from a single stored value instead, which is set either from the xex_security_info, or if it exists from the optional header instead.
Maybe this can help improve compatibility with any weird XEX's that don't have a base address optional header?)

Compressed XEX loader also has some extra checks to make sure the compressed data hash matches what's expected.
Might increase loading times by a fraction, but could save reports from people unknowingly using corrupt XEXs.
(still no checks for non-compressed data though, maybe need to compare data with xex_security_info->ImageHash?)
2018-10-20 04:18:18 +01:00
DrChat
aaf281351d Format all code with new clang-format 2017-12-14 20:44:43 -06:00
drillsar
5702814212 [xboxkrnl] Add missing break (#805) 2017-11-04 21:02:09 -05:00
gibbed
4260e3819b Added _snwprintf export implementation. 2017-05-14 18:03:53 -05:00
gibbed
dcd71c1613 Fixing format_core for %hc/%hC/%wc/%wC/%hs/%hS/%ls/%lS/%ws/%wS type specifiers. 2016-06-18 19:24:49 -05:00
Ben Vanik
ee92f75a84 Updating to the latest clang-format. Make sure to update yourselves! 2015-09-22 08:26:19 -07:00
Ben Vanik
e5fbf840d2 Shuffling kernel/. 2015-09-06 18:07:52 -07:00