| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This implements backtraces so we don't have to tell users how to use gdb anymore.
This prints a backtrace after abort or segfault is detected. It also fixes the log getting cut off with the last line containing only a bracket. This change lets us know what caused a crash not just what happened the few seconds before it.
I only know how to add support for Linux with GCC. Also this doesn't work outside of C/C++ such as in dynarmic or certain parts of graphics drivers. The good thing is that it'll try and just crash again but the stack frames are still there so the core dump will work just like before.
|
|
|
|
|
|
|
|
|
| |
This simplifies the logging system.
This also fixes some lost messages on startup.
The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.
With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
|
| |
|
|
|
|
| |
There's no point in keeping the file open after the write limit is exceeded. This allows the file to be committed to the disk shortly after it is closed and avoids redundantly checking whether or not the write limit is exceeded.
|
|\
| |
| | |
common: Replace common_sizes into user-literals
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.
To keep the global namespace clean, users will have to use:
```
using namespace Common::Literals;
```
to access these literals.
|
|/ |
|
|
|
|
| |
Similarly, Flush() is typically called to attempt to flush a file into the disk. In the one case where this is used, we do not care whether the flush has succeeded or not, making [[nodiscard]] unnecessary.
|
|
|
|
|
|
| |
There are a lot of scenarios where we don't particularly care whether or not the removal operation and just simply attempt a removal.
As such, removing the [[nodiscard]] attribute is best for these functions.
|
| |
|
|
|
|
| |
Allows us to forward declare Common::FS::IOFile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* common: fs: fs_types: Create filesystem types
Contains various filesystem types used by the Common::FS library
* common: fs: fs_util: Add std::string to std::u8string conversion utility
* common: fs: path_util: Add utlity functions for paths
Contains various utility functions for getting or manipulating filesystem paths used by the Common::FS library
* common: fs: file: Rewrite the IOFile implementation
* common: fs: Reimplement Common::FS library using std::filesystem
* common: fs: fs_paths: Add fs_paths to replace common_paths
* common: fs: path_util: Add the rest of the path functions
* common: Remove the previous Common::FS implementation
* general: Remove unused fs includes
* string_util: Remove unused function and include
* nvidia_flags: Migrate to the new Common::FS library
* settings: Migrate to the new Common::FS library
* logging: backend: Migrate to the new Common::FS library
* core: Migrate to the new Common::FS library
* perf_stats: Migrate to the new Common::FS library
* reporter: Migrate to the new Common::FS library
* telemetry_session: Migrate to the new Common::FS library
* key_manager: Migrate to the new Common::FS library
* bis_factory: Migrate to the new Common::FS library
* registered_cache: Migrate to the new Common::FS library
* xts_archive: Migrate to the new Common::FS library
* service: acc: Migrate to the new Common::FS library
* applets/profile: Migrate to the new Common::FS library
* applets/web: Migrate to the new Common::FS library
* service: filesystem: Migrate to the new Common::FS library
* loader: Migrate to the new Common::FS library
* gl_shader_disk_cache: Migrate to the new Common::FS library
* nsight_aftermath_tracker: Migrate to the new Common::FS library
* vulkan_library: Migrate to the new Common::FS library
* configure_debug: Migrate to the new Common::FS library
* game_list_worker: Migrate to the new Common::FS library
* config: Migrate to the new Common::FS library
* configure_filesystem: Migrate to the new Common::FS library
* configure_per_game_addons: Migrate to the new Common::FS library
* configure_profile_manager: Migrate to the new Common::FS library
* configure_ui: Migrate to the new Common::FS library
* input_profiles: Migrate to the new Common::FS library
* yuzu_cmd: config: Migrate to the new Common::FS library
* yuzu_cmd: Migrate to the new Common::FS library
* vfs_real: Migrate to the new Common::FS library
* vfs: Migrate to the new Common::FS library
* vfs_libzip: Migrate to the new Common::FS library
* service: bcat: Migrate to the new Common::FS library
* yuzu: main: Migrate to the new Common::FS library
* vfs_real: Delete the contents of an existing file in CreateFile
Current usages of CreateFile expect to delete the contents of an existing file, retain this behavior for now.
* input_profiles: Don't iterate the input profile dir if it does not exist
Silences an error produced in the log if the directory does not exist.
* game_list_worker: Skip parsing file if the returned VfsFile is nullptr
Prevents crashes in GetLoader when the virtual file is nullptr
* common: fs: Validate paths for path length
* service: filesystem: Open the mod load directory as read only
|
|
|
|
| |
We can also avoid redundant constructions of the same string repeatedly.
|
|
|
|
| |
Same behavior, but less verbose.
|
|\
| |
| | |
common/log: Move Log namespace into the Common namespace
|
| |
| |
| |
| |
| | |
Follows our predominant coding style. Also explicitly specifies the move
constructor/assignment operator as well.
|
| |
| |
| |
| |
| | |
Forgot to move this over when I moved the rest of the source files with
lacking namespaces over.
|
|/
|
|
| |
- Removes a dependency on core and input_common from common.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
logging/settings: Increase maximum log size to 100 MB and add extended logging option
|
| |
| |
| |
| |
| | |
The extended logging option is automatically disabled on boot but can be enabled afterwards, allowing the log file to go up to 1 GB during that session.
This commit also fixes a few errors that are present in the general debug menu.
|
| |
| |
| |
| | |
- Used by Animal Cross: New Horizons v1.6.0 update, minimal stub gets this update working.
|
|/
|
|
| |
Cleans up common so that we can enable warnings as errors.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Migrates a remaining common file over to the Common namespace, making it
consistent with the rest of common files.
This also allows for high-traffic FS related code to alias the
filesystem function namespace as
namespace FS = Common::FS;
for more concise typing.
|
|
|
|
| |
Same behavior, less code.
|
| |
|
| |
|
|
|
| |
This is better than just using something like Common.Filesystem or Common.Memory
|
|
|
|
|
|
|
| |
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
|
|
|
|
|
|
|
|
|
| |
Moves local global state into the Impl class itself and initializes it
at the creation of the instance instead of in the function.
This makes it nicer for weakly-ordered architectures, given the
CreateEntry() class won't need to have atomic loads executed for each
individual call to the CreateEntry class.
|
|
|
|
|
| |
This function is only ever used within this source file and makes it
easier to remove static state in the following change.
|
| |
|
| |
|
| |
|
|
|
|
| |
Original reason:
As Windows multi-byte character codec is unspecified while we always assume std::string uses UTF-8 in our code base, this can output gibberish when the string contains non-ASCII characters. ::OutputDebugStringW combined with Common::UTF8ToUTF16W is preferred here.
|
|\
| |
| | |
logging: Add DebuggerBackend for logging to Visual Studio
|
| | |
|
| |
| |
| |
| | |
Just a few overlooked services.
|
|/
|
|
| |
Seems to be the power controller. Listed in switchbrew under the category PTM services.
|
|
|
|
|
|
|
|
|
| |
operator+ for std::string creates an entirely new string, which is kind
of unnecessary here if we just want to append a null terminator to the
existing one.
Reduces the total amount of potential allocations that need to be done
in the logging path.
|
|
|
|
|
|
|
|
|
|
| |
* Stubbed IRS
Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly.
* Added IRS to logging backend
* Forward declared shared memory for irs
|
| |
|
|
|
|
|
|
|
| |
Multi-line doc comments still need the '<' after the ///, otherwise it's
treated as a regular comment and makes the original doc comment broken
in viewers, IDEs, etc. While we're at it, also fix some typos in the
comments.
|
| |
|
|
|
|
| |
Implicit conversions aren't desirable here.
|
|
|
|
|
|
|
| |
The previous form of initializing done here is a C-ism, an empty set of
braces is sufficient for initializing (and doesn't potentially cause
missing brace warnings, given the first member of the struct is a COORD
struct).
|
|
|
|
|
|
| |
The filter is returned via const reference, so this was making a
pointless copy of the entire filter every time a message was being
pushed into the logger instance.
|
|
|
|
| |
These weren't added when the services were introduced.
|
|
|
|
| |
Adds basic skeleton for the usb services based off the information provided by Switch Brew.
|
|
|
|
|
| |
Adds the basic skeleton of the arp services based off the information
provided by Switch Brew.
|
|\
| |
| | |
XCI and Encrypted NCA Support
|
| | |
|
|\ \
| | |
| | | |
service: Add migration services
|
| | |
| | |
| | |
| | |
| | | |
Adds the basic skeleton for the mig:usr service based off information
provided by Switch Brew.
|
| | |
| | |
| | |
| | | |
PCV isn't the parental control service.
|
|/ /
| |
| |
| |
| | |
Adds the basic skeleton for the psc services based off the information
provided by Switch Brew.
|
|\ \
| | |
| | | |
service: Add capture services
|
| |/
| |
| |
| |
| | |
Adds the basic skeleton for the capture services based off information
provided by Switch Brew.
|
|/
|
|
|
| |
Adds the basic skeleton for the remaining pcv-related services based off
information on Switch Brew.
|
|\
| |
| | |
service: Add fgm services
|
| |
| |
| |
| |
| | |
Adds the basic skeleton for the fgm services based off the information
provided by Switch Brew.
|
|/
|
|
|
| |
Adds the basic skeleton of the pcie service based off information on
Switch Brew.
|
| |
|
|\
| |
| | |
service: Add wlan services
|
| |
| |
| |
| |
| | |
Adds the basic skeleton for the wlan services based off the information
on Switch Brew.
|
|/
|
|
|
| |
Adds the skeleton for the btm services based off the information on
Switch Brew.
|
|\
| |
| | |
service: Add ncm services
|
| |
| |
| |
| |
| | |
Adds the basic skeleton for the ncm services based off information on
Switch Brew.
|
|\ \
| |/
|/| |
service: Add mii services
|
| |
| |
| |
| |
| | |
Adds the skeleton for the mii services based off information provided by
Switch Brew
|
|\ \
| | |
| | | |
service: Add nfc services
|
| |/
| |
| |
| |
| | |
Adds the skeleton of the nfc service based off the information provided
on Switch Brew.
|
|/
|
|
|
| |
Implements these functions according to the information available on
Switch Brew.
|
|
|
|
| |
Adds ldn services based off information provided by Switch Brew.
|
|
|
|
|
|
|
|
| |
Allows avoiding constructing std::string instances, since this only
reads an arbitrary sequence of characters.
We can also make ParseFilterRule() internal, since it doesn't depend on
any private instance state of Filter
|
|
|
|
|
| |
A few inclusions were being satisfied indirectly. To prevent breakages
in the future, include these directly.
|
|
|
|
|
|
| |
These can just use a view to a string since its only comparing against
two names in both cases for matches. This avoids constructing
std::string instances where they aren't necessary.
|
|
|
|
| |
Previously, we were on 4.1.0, which was a major version behind.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Now that the old macros are no longer used, we can remove all functionality related to them.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Additionally, when updating fmtlib, there was a change in fmtlib broke
how the old logging macro was overloaded, so this works around that by
just naming the fmtlib macro impl something different
|
|
|
|
| |
Due to premature merging of #262 I think the build may be failing right now. Should merge this ASAP to fix it.
|
|\
| |
| | |
Logging: Add fmtlib-based macros
|
| |
| |
| |
| |
| |
| | |
Earlier chrono was included but after some code changed it was no longer needed
Forgot to remove it so I'm removing it now
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add a new set of logging macros based on fmtlib
Similar but not exactly the same as https://github.com/citra-emu/citra/pull/3533
Citra currently uses a different version of fmt, which does not support FMT_VARIADIC so
make_args is used instead. On the other hand, yuzu uses fmt 4.1.0 which doesn't have make_args yet
so FMT_VARIADIC is used.
|
| |
| |
| |
| |
| |
| | |
service: Initialize NFP service.
Log: Add NFP service as a log subtype.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Service/AOC: stub ListAddOnContent function
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* Updated the audout:u and IAudioOut, now it might work with RetroArch without trigger an assert, however it's not the ideal implementation
* audout:u OpenAudioOut implementation and IAudioOut cmd 1,2,3,4,5 implementation
* using an enum for audio_out_state as well as changing its initialize to member initializer list
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* Minor fixes, added Service_Audio for LOG_*, changed PcmFormat enum to EnumClass
* added missing Audio loggin subclass, minor fixes, clang comment breakline
* Solving backend logging conflict
* minor fix
* Fixed duplicated Service NVDRV in backend.cpp, my bad
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added nvmemp, Added /dev/nvhost-ctrl, SetClientPID now stores pid
* used clang-format-3.9 instead
* lowercase pid
* Moved nvmemp handlers to cpp
* Removed unnecessary logging for NvOsGetConfigU32. Cleaned up log and changed to LOG_DEBUG
* using std::arrays instead of c arrays
* nvhost get config now uses std::array completely
* added pid logging back
* updated cmakelist
* missing includes
* added array, removed memcpy
* clang-format6.0
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Added support for network with ENet lib,
connecting is possible, but data can't be sent, yet.
* fixup! Added support for network with ENet lib,
* fixup! CLang
* fixup! Added support for network with ENet lib,
* fixup! Added support for network with ENet lib,
* fixup! Clang format
* More fixups!
* Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Clang again
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
* fixup! Moved ENetHost* and ENetPeer* into pimpl classes
|
| |
|
| |
|
|\
| |
| | |
APT: implemented Wrap and Unwrap
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
Fix Fatal Error in Mini-Mario & Friends - amiibo Challenge
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
frd:u: Initial stub some functions
|
| | |
|
|\ \
| | |
| | | |
Dummy implementation dlp:SRVR Service.
|
| |/ |
|
|/ |
|
|
|
|
|
|
| |
SuspendDaemons , ResumeDaemons , OverrideDefaultDaemons
The NDM file move to /core/hle/service/ndm/ now!
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit:
* Adds a new subproject, audio_core.
* Defines structures that exist in DSP shared memory.
* Hooks up various other parts of the emulator into audio core.
This sets the foundation for a later HLE DSP implementation.
|
| |
|
|
|
|
|
| |
Followup to #1102
Original author @mailwl
|
| |
|
| |
|
|
|
|
|
|
| |
Add a case of `Log::Class::Count` to the switch statement that
dispatches on `Log::Class`. The case simply calls the `UNREACHABLE`
macro.
|
|
|
|
| |
Use the UNREACHABLE macro instead of `ASSERT(false, ...);`.
|
|
|
|
|
|
| |
Add a case of `Log::Level::Count` to all switch statements that
dispatch on `Log::Level`. The case simply asserts `false` and notes
the invalid log level.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implements unrotated planar YUV 4:2:0 -> RGB24 conversions in Y2R.
Currently only the Y (luma) channel is used, so the results don't
contain color. This will be added in a later PR at some point.
This is enough to get all currently know Moflex videos to decode. (Some
don't display on-screen due to seemingly unrelated reasons.)
Thanks to @archshift for doing the initial implementation which I
cleaned up and then fixed the 8x8 block mode.
|
|
|
|
|
|
|
|
|
|
|
| |
It provided a large increase in complexity of the logging system while
having a negligible performance impact: the usage patterns of the ring
buffer meant that each log contended with the logging thread, causing
it to effectively act as a synchronous extra buffering.
Also removed some broken code related to filtering of subclasses which
was broken since it was introduced. (Which means no one ever used that
feature anyway, since, 8 months later, no one ever complained.)
|
| |
|
| |
|
|\
| |
| | |
Implement SetLcdForceBlack and add implementation for color filling in the GPU code
|
| | |
|
|/ |
|
|
|
|
| |
This was RE'd from the errdisp applet.
|
|
|
|
| |
Fixes an assertion upon executing citra in debug mode.
|
|
|
|
|
|
|
| |
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time)
As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing)
Also removed some GEKKO cruft.
|
|\
| |
| | |
Services: Stub some functions
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
Implemented the required calls to make it work.
CoreTiming: Added a new logging class Core_Timing.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Stubbed CreateMemoryBlock
Using Berkeley sockets, and Winsock2.2 on Windows.
So far ftpony creates the socket and accepts incoming connections
SOC_U: Renamed functions to maintain consistency
Also prevents possible scope errors / conflicts with the actual Berkeley socket functions
SOCU: Close all the opened sockets when cleaning up SOCU
|
| |
|
|
|
|
| |
Fixes #277
|
| |
|
| |
|
| |
|
|
|