* [PATCH] gdb: remote type_wanted parameter from a few functions
@ 2022-05-02 20:11 Simon Marchi
2022-05-02 20:13 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-05-02 20:11 UTC (permalink / raw)
To: gdb-patches; +Cc: Simon Marchi
The type_wanted value, passed down to the create_sals_from_location
callback, is never used. Remove it.
Change-Id: Ic363ee13f6af593a3e875ff7fe46de130cdc190c
---
gdb/breakpoint.c | 26 ++++++++++----------------
gdb/breakpoint.h | 3 +--
2 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 83f5e7588e0c..7241b7b69851 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -91,8 +91,7 @@ static void breakpoint_re_set_default (struct breakpoint *);
static void
create_sals_from_location_default (struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted);
+ struct linespec_result *canonical);
static void create_breakpoints_sal (struct gdbarch *,
struct linespec_result *,
@@ -234,12 +233,10 @@ static int strace_marker_p (struct breakpoint *b);
static void bkpt_probe_create_sals_from_location
(struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted);
+ struct linespec_result *canonical);
static void tracepoint_probe_create_sals_from_location
(struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted);
+ struct linespec_result *canonical);
const struct breakpoint_ops base_breakpoint_ops =
{
@@ -8892,7 +8889,7 @@ create_breakpoint (struct gdbarch *gdbarch,
try
{
- ops->create_sals_from_location (location, &canonical, type_wanted);
+ ops->create_sals_from_location (location, &canonical);
}
catch (const gdb_exception_error &e)
{
@@ -11960,8 +11957,8 @@ longjmp_breakpoint::~longjmp_breakpoint ()
static void
bkpt_probe_create_sals_from_location (struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted)
+ struct linespec_result *canonical)
+
{
struct linespec_sals lsal;
@@ -12079,11 +12076,10 @@ tracepoint::decode_location (struct event_location *location,
static void
tracepoint_probe_create_sals_from_location
(struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted)
+ struct linespec_result *canonical)
{
/* We use the same method for breakpoint on probes. */
- bkpt_probe_create_sals_from_location (location, canonical, type_wanted);
+ bkpt_probe_create_sals_from_location (location, canonical);
}
void
@@ -12150,8 +12146,7 @@ dprintf_breakpoint::after_condition_true (struct bpstat *bs)
static void
strace_marker_create_sals_from_location (struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted)
+ struct linespec_result *canonical)
{
struct linespec_sals lsal;
const char *arg_start, *arg;
@@ -12894,8 +12889,7 @@ breakpoint_re_set_default (struct breakpoint *b)
static void
create_sals_from_location_default (struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted)
+ struct linespec_result *canonical)
{
parse_breakpoint_sals (location, canonical);
}
diff --git a/gdb/breakpoint.h b/gdb/breakpoint.h
index 94ae70698a49..1322bc1b9b9b 100644
--- a/gdb/breakpoint.h
+++ b/gdb/breakpoint.h
@@ -568,8 +568,7 @@ struct breakpoint_ops
This function is called inside `create_breakpoint'. */
void (*create_sals_from_location) (struct event_location *location,
- struct linespec_result *canonical,
- enum bptype type_wanted);
+ struct linespec_result *canonical);
/* This method will be responsible for creating a breakpoint given its SALs.
Usually, it just calls `create_breakpoints_sal' (for ordinary
--
2.26.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb: remote type_wanted parameter from a few functions
2022-05-02 20:11 [PATCH] gdb: remote type_wanted parameter from a few functions Simon Marchi
@ 2022-05-02 20:13 ` Pedro Alves
2022-05-02 20:14 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2022-05-02 20:13 UTC (permalink / raw)
To: Simon Marchi, gdb-patches
On 2022-05-02 21:11, Simon Marchi via Gdb-patches wrote:
> The type_wanted value, passed down to the create_sals_from_location
> callback, is never used. Remove it.
OK.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb: remote type_wanted parameter from a few functions
2022-05-02 20:13 ` Pedro Alves
@ 2022-05-02 20:14 ` Simon Marchi
0 siblings, 0 replies; 3+ messages in thread
From: Simon Marchi @ 2022-05-02 20:14 UTC (permalink / raw)
To: Pedro Alves, gdb-patches
On 2022-05-02 16:13, Pedro Alves wrote:
> On 2022-05-02 21:11, Simon Marchi via Gdb-patches wrote:
>> The type_wanted value, passed down to the create_sals_from_location
>> callback, is never used. Remove it.
>
> OK.
Thanks, pushed (with the type in the subject fixed).
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-02 20:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 20:11 [PATCH] gdb: remote type_wanted parameter from a few functions Simon Marchi
2022-05-02 20:13 ` Pedro Alves
2022-05-02 20:14 ` Simon Marchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).