Skip to content

scripts: run gdb with -fullname so emacs gud-mode works#2366

Closed
jmarantz wants to merge 24 commits intoenvoyproxy:masterfrom
jmarantz:gdb-emacs
Closed

scripts: run gdb with -fullname so emacs gud-mode works#2366
jmarantz wants to merge 24 commits intoenvoyproxy:masterfrom
jmarantz:gdb-emacs

Conversation

@jmarantz
Copy link
Copy Markdown
Contributor

Description:
This script makes it possible to debug unit tests, which require complex bazel environment variable setup. Usually I debug inside emacs with gud-mode, because it tracks the current line in the open source-code files, and allows me to set breakpoints by pointing at a line. This requires some kind of hackery that gdb turns on, it seems, only when you pass --fullname.

I don't think it harms non-emacs-based uses of gdb. If so, we could trigger it with a flag or something.

Risk Level: Low

to the other handlers with a browser.

Add a private mechanism to have admin handlers supply arbitrary
headers.  Note that the handler callback doesn't expose a header
structure, so the public v2 API does not provide this header-control.
However, it was specifying text/html as content-type by default, so
I changed the default to text/plain (with nosniff).

Added sanitization of both the prefix string and the help text, which
need to be safely injected into the HTML doc.

Added some styling and a reference to the existing Envoy favicon as well.

Note that no existing handlers get any response bytes changed as a result
of this commit, just their content-type.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
…ms in particular.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
… can set the

content-type and/or cache-control.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…ize.

This is in prepration for supporting deletion of keys.  Also, fixes a
problem in put() of a duplicate key (which needs to be tested.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
…l class name, etc.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
 - renamed to SharedMemHashMap
 - more detail on the return values.

I still need to add some version-stamping.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Changes hash-map implemenation to a hash-set, which makes it easier to
allow Envoy to retain its own name storage as it does today.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
…ed method.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
… rather than hard-coding it.

The primes algorithms could be improved upon, of course, but they only
need to be run at startup.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
…te in an assert.

Signed-off-by: Joshua Marantz <jmarantz@google.com>
Signed-off-by: Joshua Marantz <jmarantz@google.com>
@jmarantz jmarantz closed this Jan 14, 2018
@jmarantz
Copy link
Copy Markdown
Contributor Author

Sorry I'm still learning how to use git properly. I didn't mean to pull in a bunch of files from another PR for this simple one-line script change.

@jmarantz jmarantz deleted the gdb-emacs branch January 14, 2018 19:17
Shikugawa pushed a commit to Shikugawa/envoy that referenced this pull request Mar 28, 2020
Signed-off-by: Kuat Yessenov <kuat@google.com>
jpsim added a commit that referenced this pull request Nov 28, 2022
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim added a commit that referenced this pull request Nov 29, 2022
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant