Merge branch 'vendor/GDB'
[dragonfly.git] / contrib / gdb-7 / gdb / linespec.h
1 /* Header for GDB line completion.
2    Copyright (C) 2000, 2007, 2008, 2009, 2010, 2011
3    Free Software Foundation, Inc.
4
5    This program is free software; you can redistribute it and/or modify
6    it under the terms of the GNU General Public License as published by
7    the Free Software Foundation; either version 3 of the License, or
8    (at your option) any later version.
9
10    This program is distributed in the hope that it will be useful,
11    but WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13    GNU General Public License for more details.
14
15    You should have received a copy of the GNU General Public License
16    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
17
18 #if !defined (LINESPEC_H)
19 #define LINESPEC_H 1
20
21 struct symtab;
22
23 /* An instance of this may be filled in by decode_line_1.  The caller
24    must call init_linespec_result to initialize it.  */
25
26 struct linespec_result
27 {
28   /* If non-zero, the linespec should be displayed to the user.  This
29      is used by "unusual" linespecs where the ordinary `info break'
30      display mechanism would do the wrong thing.  */
31   int special_display;
32
33   /* If non-NULL, an array of canonical names for returned
34      symtab_and_line objects.  The array has as many elements as the
35      `nelts' field in the symtabs_and_line returned by decode_line_1.
36      An element in the array may be NULL.  The array and each non-NULL
37      element in it are allocated with xmalloc and must be freed by the
38      caller.  */
39   char **canonical;
40 };
41
42 /* Initialize a linespec_result.  */
43
44 extern void init_linespec_result (struct linespec_result *);
45
46 extern struct symtabs_and_lines
47         decode_line_1 (char **argptr, int funfirstline,
48                        struct symtab *default_symtab, int default_line,
49                        struct linespec_result *canonical);
50
51 #endif /* defined (LINESPEC_H) */