Commit Graph

119 Commits

Author SHA1 Message Date
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 Pazylbekova 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
baldurk 3c319024e8 Remove useless spammy log print of progress. 2018-12-21 12:38:29 +00:00
baldurk 4b11dce193 Fix linux compilation 2018-06-13 20:54:30 +01:00
baldurk b36b1fa453 Change remote server version to be == RenderDoc version
* Any time the replay types serialisation change, the remote server becomes
  incompatible. We're not going to add backwards compatibility to that system,
  so we need to break it every time.
* Really the version should be bumped any time renderdoc_serialise.inl changes,
  but we don't have an auto-incrementing revision to use.
2018-06-13 17:40:02 +01:00
baldurk 858b02480b Pass command-line args as 'intent args' when launching apk. Refs #987 2018-05-24 21:42:29 +01:00
baldurk 13c1cf6ad4 Return ReplayStatus when launching/injecting, use to indicate JDWP error
* If android studio or other android tools are open when a package is
  launched for debugging, they greedily jump on it and connect which
  prevents us from connecting.
2018-02-20 11:54:57 +00:00
baldurk 1792673864 Show an error message if saving changes fails 2018-02-19 00:52:14 +00:00
baldurk 04fac1d6f8 Use android properties to pass capture options to the device 2018-02-14 19:22:23 +00:00
baldurk 8622471277 Reset android vulkan layer property as late as possible
* We can't reliably know when we can safely remove the layer property
  at capture time because it's impossible to know if an android app will
  use vulkan or not. So instead we fall back to unsetting it whenever we
  need to - before opening a capture or when shutting down the remote
  server (in case after capturing, no frame capture was actually opened)
* This means that if the UI crashes without unsetting it, we will poison
  the state, but this seems unavoidable.
2018-02-09 14:02:31 +00:00
baldurk 427a89db0b Create parent directory for file transfers to remote server 2018-02-01 18:25:31 +00:00
baldurk 5527c57e68 Split out some miscellaneous utility functions
* We also wrap up and cache the fetching of friendly names by serial
  number to avoid some adb traffic.
2018-01-26 16:30:16 +00:00
baldurk ae7300e524 Move android files to separate subfolder 2018-01-26 15:49:09 +00:00