Commit Graph
130 Commits
Author SHA1 Message Date
Jake Turner b49291a611 Make enum RemoteServerPacket into enum class, move Count to the end 2026-01-07 09:10:06 +13:00
baldurk 856c838def Update copyright years to 2026 and fix copyright ranges
* In a previous update in 2021 many copyright ranges were truncated
  accidentally, and some files have been copy-pasted with wrong years. These
  dates have been fixed based on git history and original copyright messages.
2026-01-05 14:17:28 +00:00
Jake Turner 10cf43b703 ICaptureAccess APIs for externally referenced dependency files
ResultDetails EmbedDependentFilesIntoCapture();
ResultDetails RemoveDependentFilesFromCapture();
int32_t CountEmbeddedDependentFiles();
int32_t CountExternallyReferencedFiles();
rdcarray<rdcstr> GetExternallyReferencedFiles();
2025-12-11 11:13:29 +13:00
baldurk 2322e165de Update copyright years to 2025 2025-03-14 18:54:37 +00:00
baldurk e6d0d57f80 Wait for initial remote probe before connecting to server. Closes #3445 2024-10-21 14:30:37 +01:00
baldurk 9f4f0e6aa1 Update copyright years to 2024 2024-02-12 11:04:52 +00:00
james-sumihiroandBaldur Karlsson 783d76fe73 Fix two handle leaks during remote probe
Added logic to the entry point RENDERDOC_CreateRemoteServerConnection to shutdown the socket used to connect to a remote device when the function is used to test a connection (IRemoteServer **rend is null.) This previously created a handle leak, visible as accumulating /device/afd/ file handles on Windows.

Added logic to the Windows specialization of Process::LaunchProcess so it will close two handles: hChildStdError_Rd, and hChildStdOutput_Rd if the handles were created successfully but the process failed to launch. Previously these would accumulate during a remote probe for Android devices if ADB was not present or otherwise failed to launch.
2024-01-15 10:54:01 +00:00
baldurk 9995c1f0cf Protect against invalid socket data potentially causing crashes 2023-08-04 17:06:03 +01:00
baldurk 1f72a09e3b Sanitise strings printed when received from target control/remote server
* Given socket corruption or network errors these strings could contain
  unprintable characters so we sanitise them reasonably. This also ameliorates a
  potential security concern with arbitrary strings being written to a log, but
  these connections are still considered trusted and users should not be
  exposing RenderDoc ports to the internet.
2023-05-19 10:28:58 +01:00
baldurk d47e79ae07 Update copyright years to 2023 2023-02-01 12:23:32 +00:00
baldurk 39920c1b71 Show the version running when connecting to incompatible remote server 2022-10-03 20:10:41 +01:00
baldurk 8aa0390948 Add string messages to returned result codes to display to user
* Most of the main entry points that can fail with relevant reasons now has a
  way of specifying a message to return with it. This message can be displayed
  to the user to give more information or context about an error.
2022-04-26 16:21:54 +01:00
baldurk fcdea67879 Update copyright years to 2022 2022-02-17 17:38:32 +00:00
baldurk 99adcc614f Allow multiple remote servers on one hostname, on different ports
* When a port is specified (with the usual :12345 suffix on the hostname) we use
  that for remote replay connections. We disable target control enumeration
  since that requires a port _range_ and captured applications self-assign those
  ports. Those can still be accessed via a normal unsuffixed remote specifier -
  even if there is no remote server running on the default port.
2022-02-15 17:15:48 +00:00
baldurk 026da176bb Update copyright years to 2021 2021-01-13 13:56:10 +00:00
baldurk 523af0f2b4 Ensure replay controller only gets deleted via Shutdown() 2020-12-16 14:42:20 +00:00
baldurk e5f4ca7bb8 Remove use of const char * in public API and OS specific where possible
* This prevents unnecessary conversions back and forth between rdcstr and const
  char * when going through interfaces. In the OS specific layer this is rarely
  an issue because most of the implementations don't convert to rdcstr, but it
  is convenient to be able to pass in an rdcstr directly. The few cases where
  there's an unecessary construction of an rdcstr is acceptable.
* A couple of places in the public API need to return a string from a global
  function, so can't return an rdcstr due to C ABI, so they still return a const
  char *.
* Similarly const char * is kept for logging, to avoid a dependency on rdcstr
  and because that's one place where unnecessary conversions/constructions may
  be impactful.
2020-12-07 17:44:50 +00:00
baldurk 40002634ad Fix order of operations error when shutting down remote replay 2020-10-28 12:08:36 +00:00
baldurk 8f6359059b Make more config flags non-debug.
* Only performance-sensitive flags should be debug only. Otherwise there's no
  strong reason to limit these to non-official builds.
2020-10-01 17:48:35 +01:00
baldurk 680857cb0f Fix structured data conversion to preserve timestamp base
* The timestamp base is queryable from the capture file and settable too, and
  conversions preserve un-rebased timestamps. Only rebasing when loading a
  capture for replay.
2020-08-27 15:54:01 +01:00
baldurk c8d75f57d9 Fix remote server version calculation 2020-07-02 17:19:07 +01:00
baldurk 77e0141022 Fix remote server not shutting down properly 2020-05-16 12:25:34 +01:00
baldurk 08cf66abce Fix racing busy signals when connecting to remote servers 2020-05-15 19:03:26 +01:00
baldurk 6b657965b1 Fix settings not being properly re-evaluated on access 2020-05-14 19:28:09 +01:00
baldurk 5306b18ad0 Log both sides of remote server if enabled 2020-05-14 19:28:09 +01:00
baldurk e034defb0e Add debug option to log verbosely on android process launch 2020-04-22 14:24:21 +01:00
baldurk d408f77241 Add configuration system for core renderdoc module
* This allows persistent config storage and registering tweak variables that
  works independent of the UI's configuration.
* Config vars can be debug only, which means they will be compiled out in stable
  version releases. This allows for debug-logging tweaks that are available in
  all builds (including nightly builds) for diagnostic purposes, but have zero
  overhead in stable releases.
* Variables have a loose hierarchy defined with _ or . to separate nodes.
2020-03-18 17:34:59 +00:00
baldurk d3cbc6aadb Handle invalid filenames passed to CopyCaptureToRemote 2020-02-05 14:15:10 +00:00
baldurk baac06ca93 Remove redundant/dead code identified by PVS Studio 2020-01-21 18:28:56 +00:00
baldurk f4ab28205f Add option to non-interactively resolve callstack symbols
* Primarily for use in scripts
2020-01-13 18:29:50 +00:00
baldurk 2916c0f9f7 Update copyright years to 2020 2020-01-06 16:20:45 +00:00
baldurk 27098f8f70 Give our threads debugger-friendly names 2019-12-19 21:50:13 +00:00
baldurk bd9f4fc389 Remove use of vector/string from core project
* This also affects the drivers via interfaces e.g. IReplayDriver and some
  utility functions.
2019-12-16 18:10:31 +00:00
baldurk c4ca8cb1d1 Reduce reliance on big public headers where possible
* Mostly moving includes from common headers to cpp where possible, and removing
  includes of the whole thing where only enums or rdcstr etc are needed.
2019-12-16 17:06:16 +00:00
baldurk 5f72b9d53c Remove std::string/std::vector use from os-specific layer 2019-12-16 17:06:15 +00:00
baldurk 5f33403849 Switch string_utils to use rdc types 2019-12-16 17:06:15 +00:00
baldurk 48c98a3dc1 Add debug-time options for debugging the remote server 2019-10-29 18:08:34 +00:00
baldurk 20be9f3d52 Add ReplayOptions struct to contain replay-time configuration
* Not currently exposed to the UI or used by the drivers, we just pass the
  default object through
2019-08-27 18:51:56 +01:00
baldurk 878acd4ad9 Add a function to enumerate which GPUs are available at replay time 2019-08-27 18:51:56 +01:00
baldurk e2704fa2eb Add an abstracted interface around android-specific handling
* This makes it easier to use the same kind of interface to manage other kinds
  of devices.
2019-07-31 17:51:13 +01:00
baldurk 268173982a Fix return value of RemoteServer::DriverName() 2019-07-01 16:57:56 +01:00
Aliya PazylbekovaandBaldur Karlsson e21ddb4877 Set analytics APIs for remote capture file and replay
The API used was not populated for the case of remote
capture and replay.
2019-06-20 19:13:57 +01:00
baldurk 4738844122 Allow choosing activities for an android program. Closes #1387 2019-06-04 18:18:09 +01:00
baldurk 7206a0cd25 Removing 'use std::vector' 2019-05-17 16:32:56 +01:00
baldurk e48065c96b Replace use of std::pair with rdcpair wherever possible
* Only remaining uses in our code is when we're interacting with std::map where
  it uses std::pair internally
2019-05-17 16:32:56 +01:00
baldurk a965a3a703 Remove 'using std::string'
* This will make it easier to replace std::string with rdcstr in future
2019-05-17 16:32:56 +01:00
baldurk 79a626a8e1 Put android logcat processing onto separate thread
* This allows it to tick faster when e.g. loading a capture that takes a while
  without any pings. It also allows it to continue going for a short while after
  the remote server shuts down to capture any crashdump messages.
2019-02-14 18:01:09 +00:00
baldurk c6b02c4d0c Pull adb logcat from renderdoc into log on host machine
* This makes post-mortem debugging easier. It's only active while a remote
  server connection is running, so e.g. it will miss crashes of the remote
  server itself, this could be improved by adding a margin where it will still
  check for messages after the connection is dropped - perhaps on a separate
  thread.
2019-02-08 19:16:26 +00:00
baldurk 86ff87863e Update copyright years to 2019 2019-02-01 18:32:13 +00:00
baldurk d64ad19f16 Add an optional timeout to Socket::AcceptClient
* This is needed since sometimes on tests a localhost socket won't immediately
  be available to accept()
2019-01-17 17:51:07 +00:00