* tracepoint.c (print_one_static_tracepoint_marker): Constify.
* symtab.c (iterate_over_some_symtabs): Constify. * source.h (symtab_to_fullname): Return 'const char *'. * source.c (symtab_to_fullname): Return 'const char *'. * python/py-symtab.c (stpy_fullname): Constify. * cli/cli-cmds.c (edit_command): Constify. * breakpoint.c (print_breakpoint_location) (update_static_tracepoint): Constify.
This commit is contained in:
parent
94b0e70d0c
commit
0b0865da62
8 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
2012-10-18 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* tracepoint.c (print_one_static_tracepoint_marker): Constify.
|
||||||
|
* symtab.c (iterate_over_some_symtabs): Constify.
|
||||||
|
* source.h (symtab_to_fullname): Return 'const char *'.
|
||||||
|
* source.c (symtab_to_fullname): Return 'const char *'.
|
||||||
|
* python/py-symtab.c (stpy_fullname): Constify.
|
||||||
|
* cli/cli-cmds.c (edit_command): Constify.
|
||||||
|
* breakpoint.c (print_breakpoint_location)
|
||||||
|
(update_static_tracepoint): Constify.
|
||||||
|
|
||||||
2012-10-18 Tom Tromey <tromey@redhat.com>
|
2012-10-18 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* breakpoint.c (compare_breakpoints): Fix comparison.
|
* breakpoint.c (compare_breakpoints): Fix comparison.
|
||||||
|
|
|
@ -5689,7 +5689,7 @@ print_breakpoint_location (struct breakpoint *b,
|
||||||
if (ui_out_is_mi_like_p (uiout))
|
if (ui_out_is_mi_like_p (uiout))
|
||||||
{
|
{
|
||||||
struct symtab_and_line sal = find_pc_line (loc->address, 0);
|
struct symtab_and_line sal = find_pc_line (loc->address, 0);
|
||||||
char *fullname = symtab_to_fullname (sal.symtab);
|
const char *fullname = symtab_to_fullname (sal.symtab);
|
||||||
|
|
||||||
if (fullname)
|
if (fullname)
|
||||||
ui_out_field_string (uiout, "fullname", fullname);
|
ui_out_field_string (uiout, "fullname", fullname);
|
||||||
|
@ -13822,7 +13822,7 @@ update_static_tracepoint (struct breakpoint *b, struct symtab_and_line sal)
|
||||||
|
|
||||||
if (ui_out_is_mi_like_p (uiout))
|
if (ui_out_is_mi_like_p (uiout))
|
||||||
{
|
{
|
||||||
char *fullname = symtab_to_fullname (sal2.symtab);
|
const char *fullname = symtab_to_fullname (sal2.symtab);
|
||||||
|
|
||||||
if (fullname)
|
if (fullname)
|
||||||
ui_out_field_string (uiout, "fullname", fullname);
|
ui_out_field_string (uiout, "fullname", fullname);
|
||||||
|
|
|
@ -762,7 +762,8 @@ edit_command (char *arg, int from_tty)
|
||||||
struct symbol *sym;
|
struct symbol *sym;
|
||||||
char *arg1;
|
char *arg1;
|
||||||
char *editor;
|
char *editor;
|
||||||
char *p, *fn;
|
char *p;
|
||||||
|
const char *fn;
|
||||||
|
|
||||||
/* Pull in the current default source line if necessary. */
|
/* Pull in the current default source line if necessary. */
|
||||||
if (arg == 0)
|
if (arg == 0)
|
||||||
|
|
|
@ -126,7 +126,7 @@ stpy_get_objfile (PyObject *self, void *closure)
|
||||||
static PyObject *
|
static PyObject *
|
||||||
stpy_fullname (PyObject *self, PyObject *args)
|
stpy_fullname (PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
char *fullname;
|
const char *fullname;
|
||||||
struct symtab *symtab = NULL;
|
struct symtab *symtab = NULL;
|
||||||
|
|
||||||
STPY_REQUIRE_VALID (self, symtab);
|
STPY_REQUIRE_VALID (self, symtab);
|
||||||
|
|
|
@ -1081,7 +1081,7 @@ open_source_file (struct symtab *s)
|
||||||
If this function fails to find the file that this symtab represents,
|
If this function fails to find the file that this symtab represents,
|
||||||
NULL will be returned and s->fullname will be set to NULL. */
|
NULL will be returned and s->fullname will be set to NULL. */
|
||||||
|
|
||||||
char *
|
const char *
|
||||||
symtab_to_fullname (struct symtab *s)
|
symtab_to_fullname (struct symtab *s)
|
||||||
{
|
{
|
||||||
int r;
|
int r;
|
||||||
|
|
|
@ -48,7 +48,7 @@ extern int find_and_open_source (const char *filename,
|
||||||
negative number for error. */
|
negative number for error. */
|
||||||
extern int open_source_file (struct symtab *s);
|
extern int open_source_file (struct symtab *s);
|
||||||
|
|
||||||
extern char* symtab_to_fullname (struct symtab *s);
|
extern const char *symtab_to_fullname (struct symtab *s);
|
||||||
|
|
||||||
/* Create and initialize the table S->line_charpos that records the
|
/* Create and initialize the table S->line_charpos that records the
|
||||||
positions of the lines in the source file, which is assumed to be
|
positions of the lines in the source file, which is assumed to be
|
||||||
|
|
|
@ -242,7 +242,7 @@ iterate_over_some_symtabs (const char *name,
|
||||||
|
|
||||||
if (real_path != NULL)
|
if (real_path != NULL)
|
||||||
{
|
{
|
||||||
char *fullname = symtab_to_fullname (s);
|
const char *fullname = symtab_to_fullname (s);
|
||||||
|
|
||||||
if (fullname != NULL)
|
if (fullname != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4838,7 +4838,7 @@ print_one_static_tracepoint_marker (int count,
|
||||||
|
|
||||||
if (ui_out_is_mi_like_p (uiout))
|
if (ui_out_is_mi_like_p (uiout))
|
||||||
{
|
{
|
||||||
char *fullname = symtab_to_fullname (sal.symtab);
|
const char *fullname = symtab_to_fullname (sal.symtab);
|
||||||
|
|
||||||
if (fullname)
|
if (fullname)
|
||||||
ui_out_field_string (uiout, "fullname", fullname);
|
ui_out_field_string (uiout, "fullname", fullname);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue