* ada-exp.y (write_object_renaming, write_var_or_type)
authorTom Tromey <tromey@redhat.com>
Mon, 3 Dec 2012 19:59:14 +0000 (19:59 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 3 Dec 2012 19:59:14 +0000 (19:59 +0000)
(write_ambiguous_var, write_var_from_sym): Make blocks const.
* ada-lang.c (replace_operator_with_call)
(find_old_style_renaming_symbol): Make blocks const.
* ada-lang.h (ada_find_renaming_symbol): Update.
(struct ada_symbol_info) <block>: Now const.
* breakpoint.c (watch_command_1): Update.
* breakpoint.h (struct watchpoint) <exp_valid_block,
cond_exp_valid_block>: Now const.
* c-exp.y (classify_inner_name, classify_name): Make block
argument const.
* expprint.c (print_subexp_standard) <OP_VAR_VALUE>: Make 'b'
const.
* expression.h (innermost_block, parse_exp_1): Update.
(union exp_element) <block>: Now const.
* gdbtypes.c (lookup_template_type, lookup_enum, lookup_union)
(lookup_struct): Make block argument const.
* gdbtypes.h (lookup_template_type): Update.
* go-exp.y (classify_name, classify_packaged_name)
(package_name_p): Make block argument const.
* objc-lang.c (lookup_struct_typedef): Make block argument const.
* objc-lang.h (lookup_struct_typedef): Update.
* parse.c (parse_exp_in_context, parse_exp_1)
(write_exp_elt_block): Make block arguments const.
(expression_context_block, innermost_block): Now const.
* parser-defs.h (write_exp_elt_block): Update.
(expression_context_block, innermost_block, block_found): Now
const.
* printcmd.c (struct display) <block>: Now const.
* symtab.h (lookup_struct, lookup_union, lookup_enum): Update.
* valops.c (address_of_variable): Make block argument const.
* value.h (value_of_variable): Update.
* varobj.c (struct varobj_root) <valid_block>: Now const.

22 files changed:
gdb/ChangeLog
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h
gdb/breakpoint.c
gdb/breakpoint.h
gdb/c-exp.y
gdb/expprint.c
gdb/expression.h
gdb/gdbtypes.c
gdb/gdbtypes.h
gdb/go-exp.y
gdb/objc-lang.c
gdb/objc-lang.h
gdb/parse.c
gdb/parser-defs.h
gdb/printcmd.c
gdb/symtab.c
gdb/symtab.h
gdb/valops.c
gdb/value.h
gdb/varobj.c

index 72423fbc3a1de1772c85deb20326beb16db89344..5e2a263a86e66ab30df7252eb4c9053254f4a4b4 100644 (file)
@@ -1,3 +1,39 @@
+2012-12-03  Tom Tromey  <tromey@redhat.com>
+
+       * ada-exp.y (write_object_renaming, write_var_or_type)
+       (write_ambiguous_var, write_var_from_sym): Make blocks const.
+       * ada-lang.c (replace_operator_with_call)
+       (find_old_style_renaming_symbol): Make blocks const.
+       * ada-lang.h (ada_find_renaming_symbol): Update.
+       (struct ada_symbol_info) <block>: Now const.
+       * breakpoint.c (watch_command_1): Update.
+       * breakpoint.h (struct watchpoint) <exp_valid_block,
+       cond_exp_valid_block>: Now const.
+       * c-exp.y (classify_inner_name, classify_name): Make block
+       argument const.
+       * expprint.c (print_subexp_standard) <OP_VAR_VALUE>: Make 'b'
+       const.
+       * expression.h (innermost_block, parse_exp_1): Update.
+       (union exp_element) <block>: Now const.
+       * gdbtypes.c (lookup_template_type, lookup_enum, lookup_union)
+       (lookup_struct): Make block argument const.
+       * gdbtypes.h (lookup_template_type): Update.
+       * go-exp.y (classify_name, classify_packaged_name)
+       (package_name_p): Make block argument const.
+       * objc-lang.c (lookup_struct_typedef): Make block argument const.
+       * objc-lang.h (lookup_struct_typedef): Update.
+       * parse.c (parse_exp_in_context, parse_exp_1)
+       (write_exp_elt_block): Make block arguments const.
+       (expression_context_block, innermost_block): Now const.
+       * parser-defs.h (write_exp_elt_block): Update.
+       (expression_context_block, innermost_block, block_found): Now
+       const.
+       * printcmd.c (struct display) <block>: Now const.
+       * symtab.h (lookup_struct, lookup_union, lookup_enum): Update.
+       * valops.c (address_of_variable): Make block argument const.
+       * value.h (value_of_variable): Update.
+       * varobj.c (struct varobj_root) <valid_block>: Now const.
+
 2012-11-30  Yao Qi  <yao@codesourcery.com>
 
        * breakpoint.c (print_one_breakpoint_location): Indent code.
index 1a80b0b1fe49d6934c60d4b0ded832e3427cfabb..57c7d86e62b0600387727e4e193f41edfa7e90d5 100644 (file)
@@ -130,10 +130,10 @@ static struct stoken string_to_operator (struct stoken);
 
 static void write_int (LONGEST, struct type *);
 
-static void write_object_renaming (struct block *, const char *, int,
+static void write_object_renaming (const struct block *, const char *, int,
                                   const char *, int);
 
-static struct type* write_var_or_type (struct block *, struct stoken);
+static struct type* write_var_or_type (const struct block *, struct stoken);
 
 static void write_name_assoc (struct stoken);
 
@@ -143,7 +143,7 @@ static struct block *block_lookup (struct block *, char *);
 
 static LONGEST convert_char_literal (struct type *, LONGEST);
 
-static void write_ambiguous_var (struct block *, char *, int);
+static void write_ambiguous_var (const struct block *, char *, int);
 
 static struct type *type_int (void);
 
@@ -818,8 +818,8 @@ string_to_operator (struct stoken string)
 /* Emit expression to access an instance of SYM, in block BLOCK (if
  * non-NULL), and with :: qualification ORIG_LEFT_CONTEXT.  */
 static void
-write_var_from_sym (struct block *orig_left_context,
-                   struct block *block,
+write_var_from_sym (const struct block *orig_left_context,
+                   const struct block *block,
                    struct symbol *sym)
 {
   if (orig_left_context == NULL && symbol_read_needs_frame (sym))
@@ -867,7 +867,7 @@ write_exp_op_with_string (enum exp_opcode opcode, struct stoken token)
  * new encoding entirely (FIXME pnh 7/20/2007).  */
 
 static void
-write_object_renaming (struct block *orig_left_context,
+write_object_renaming (const struct block *orig_left_context,
                       const char *renamed_entity, int renamed_entity_len,
                       const char *renaming_expr, int max_depth)
 {
@@ -1161,7 +1161,7 @@ write_selectors (char *sels)
    a temporary symbol that is valid until the next call to ada_parse.
    */
 static void
-write_ambiguous_var (struct block *block, char *name, int len)
+write_ambiguous_var (const struct block *block, char *name, int len)
 {
   struct symbol *sym =
     obstack_alloc (&temp_parse_space, sizeof (struct symbol));
@@ -1253,7 +1253,7 @@ get_symbol_field_type (struct symbol *sym, char *encoded_field_name)
    identifier).  */
 
 static struct type*
-write_var_or_type (struct block *block, struct stoken name0)
+write_var_or_type (const struct block *block, struct stoken name0)
 {
   int depth;
   char *encoded_name;
index deefcfb291e21813127d4812bcef0082e6af4b36..b03b2a2c7bec092d4e0e5f7d6ae9b6eac73d4ab3 100644 (file)
@@ -128,7 +128,7 @@ static struct value *resolve_subexp (struct expression **, int *, int,
                                      struct type *);
 
 static void replace_operator_with_call (struct expression **, int, int, int,
-                                        struct symbol *, struct block *);
+                                        struct symbol *, const struct block *);
 
 static int possible_user_operator_p (enum exp_opcode, struct value **);
 
@@ -150,7 +150,7 @@ static enum ada_renaming_category parse_old_style_renaming (struct type *,
                                                            const char **);
 
 static struct symbol *find_old_style_renaming_symbol (const char *,
-                                                     struct block *);
+                                                     const struct block *);
 
 static struct type *ada_lookup_struct_elt_type (struct type *, char *,
                                                 int, int, int *);
@@ -3719,7 +3719,7 @@ get_selections (int *choices, int n_choices, int max_results,
 static void
 replace_operator_with_call (struct expression **expp, int pc, int nargs,
                             int oplen, struct symbol *sym,
-                            struct block *block)
+                            const struct block *block)
 {
   /* A new expression, with 6 more elements (3 for funcall, 4 for function
      symbol, -oplen for operator being replaced).  */
@@ -4232,7 +4232,7 @@ lookup_cached_symbol (const char *name, domain_enum namespace,
 
 static void
 cache_symbol (const char *name, domain_enum namespace, struct symbol *sym,
-              struct block *block)
+              const struct block *block)
 {
 }
 \f
@@ -4805,7 +4805,7 @@ remove_irrelevant_renamings (struct ada_symbol_info *syms,
   for (i = 0; i < nsyms; i += 1)
     {
       struct symbol *sym = syms[i].sym;
-      struct block *block = syms[i].block;
+      const struct block *block = syms[i].block;
       const char *name;
       const char *suffix;
 
@@ -7195,7 +7195,7 @@ ada_find_any_type (const char *name)
    Return symbol if found, and NULL otherwise.  */
 
 struct symbol *
-ada_find_renaming_symbol (struct symbol *name_sym, struct block *block)
+ada_find_renaming_symbol (struct symbol *name_sym, const struct block *block)
 {
   const char *name = SYMBOL_LINKAGE_NAME (name_sym);
   struct symbol *sym;
@@ -7217,7 +7217,7 @@ ada_find_renaming_symbol (struct symbol *name_sym, struct block *block)
 }
 
 static struct symbol *
-find_old_style_renaming_symbol (const char *name, struct block *block)
+find_old_style_renaming_symbol (const char *name, const struct block *block)
 {
   const struct symbol *function_sym = block_linkage_function (block);
   char *rename;
index f6154fde09aa952dcde3e50f96b6994c274f2821..ab6997dd74fa9940f8d55247cf8eae102203bce4 100644 (file)
@@ -90,7 +90,7 @@ struct ada_symbol_info
   struct symbol *sym;
 
   /* The block where the symbol was found.  */
-  struct block *block;
+  const struct block *block;
 };
 
 /* Denotes a type of renaming symbol (see ada_parse_renaming).  */
@@ -342,7 +342,7 @@ extern struct type *ada_find_parallel_type (struct type *,
 extern LONGEST get_int_var_value (char *, int *);
 
 extern struct symbol *ada_find_renaming_symbol (struct symbol *name_sym,
-                                                struct block *block);
+                                                const struct block *block);
 
 extern int ada_prefer_type (struct type *, struct type *);
 
index 59b7bf3276626e047fc113d8a20376c1cb5e8af8..01a472c63178c02b066bdaa754d9ac7dc0055758 100644 (file)
@@ -10750,7 +10750,7 @@ watch_command_1 (char *arg, int accessflag, int from_tty,
   volatile struct gdb_exception e;
   struct breakpoint *b, *scope_breakpoint = NULL;
   struct expression *exp;
-  struct block *exp_valid_block = NULL, *cond_exp_valid_block = NULL;
+  const struct block *exp_valid_block = NULL, *cond_exp_valid_block = NULL;
   struct value *val, *mark, *result;
   struct frame_info *frame;
   char *exp_start = NULL;
index 8b1bcb737720b385d3f77dce65f1e410cdb7dd77..546e85514ed76de629e08bc157e21037340b16dc 100644 (file)
@@ -756,12 +756,12 @@ struct watchpoint
   struct expression *exp;
   /* The largest block within which it is valid, or NULL if it is
      valid anywhere (e.g. consists just of global symbols).  */
-  struct block *exp_valid_block;
+  const struct block *exp_valid_block;
   /* The conditional expression if any.  */
   struct expression *cond_exp;
   /* The largest block within which it is valid, or NULL if it is
      valid anywhere (e.g. consists just of global symbols).  */
-  struct block *cond_exp_valid_block;
+  const struct block *cond_exp_valid_block;
   /* Value of the watchpoint the last time we checked it, or NULL when
      we do not know the value yet or the value was not readable.  VAL
      is never lazy.  */
index 11eaadbdf884370fbc89ff273f0906fee9f6195c..05d12be7948a1f6bbee2c8e30c41d3a77e53958b 100644 (file)
@@ -2699,7 +2699,7 @@ static struct obstack name_obstack;
    in which lookups start; this can be NULL to mean the global
    scope.  */
 static int
-classify_name (struct block *block)
+classify_name (const struct block *block)
 {
   struct symbol *sym;
   char *copy;
@@ -2791,7 +2791,7 @@ classify_name (struct block *block)
    in `yylval' is the first component of a name, false otherwise.  */
 
 static int
-classify_inner_name (struct block *block, int first_name)
+classify_inner_name (const struct block *block, int first_name)
 {
   struct type *type, *new_type;
   char *copy;
index ddd3a77c77c91dd52152efe1f6529822c8f7d615..b68fbeef436df78b9afd119f73a76ddb549b953f 100644 (file)
@@ -122,7 +122,7 @@ print_subexp_standard (struct expression *exp, int *pos,
 
     case OP_VAR_VALUE:
       {
-       struct block *b;
+       const struct block *b;
 
        (*pos) += 3;
        b = exp->elts[pc + 1].block;
index 004a60e85c2e93243ba900bd26e75eee9e840481..3b70ef3f410687b1d692dcb2d64eb037465ce2ea 100644 (file)
@@ -73,7 +73,7 @@ union exp_element
     char string;
     struct type *type;
     struct internalvar *internalvar;
-    struct block *block;
+    const struct block *block;
     struct objfile *objfile;
   };
 
@@ -100,8 +100,8 @@ extern struct expression *parse_expression (char *);
 
 extern struct type *parse_field_expression (char *, char **);
 
-extern struct expression *parse_exp_1 (char **, CORE_ADDR pc, struct block *,
-                                      int);
+extern struct expression *parse_exp_1 (char **, CORE_ADDR pc,
+                                      const struct block *, int);
 
 /* For use by parsers; set if we want to parse an expression and
    attempt to complete a field name.  */
@@ -110,7 +110,7 @@ extern int in_parse_field;
 /* The innermost context required by the stack and register variables
    we've encountered so far.  To use this, set it to NULL, then call
    parse_<whatever>, then look at it.  */
-extern struct block *innermost_block;
+extern const struct block *innermost_block;
 
 /* From eval.c */
 
index d32200417596fbb733868bcaac07595e394b4ed5..ceb52a55d384fca949929bf3e5ad3e61a09e6bc9 100644 (file)
@@ -1234,7 +1234,7 @@ lookup_signed_typename (const struct language_defn *language,
    visible in lexical block BLOCK.  */
 
 struct type *
-lookup_struct (const char *name, struct block *block)
+lookup_struct (const char *name, const struct block *block)
 {
   struct symbol *sym;
 
@@ -1256,7 +1256,7 @@ lookup_struct (const char *name, struct block *block)
    visible in lexical block BLOCK.  */
 
 struct type *
-lookup_union (const char *name, struct block *block)
+lookup_union (const char *name, const struct block *block)
 {
   struct symbol *sym;
   struct type *t;
@@ -1280,7 +1280,7 @@ lookup_union (const char *name, struct block *block)
    visible in lexical block BLOCK.  */
 
 struct type *
-lookup_enum (const char *name, struct block *block)
+lookup_enum (const char *name, const struct block *block)
 {
   struct symbol *sym;
 
@@ -1302,7 +1302,7 @@ lookup_enum (const char *name, struct block *block)
 
 struct type *
 lookup_template_type (char *name, struct type *type, 
-                     struct block *block)
+                     const struct block *block)
 {
   struct symbol *sym;
   char *nam = (char *) 
index b23df9ae42fa7fe827df2796c40f5abbe641432f..fb113d21b917be32e18568b76d1ebe8c87ad2542 100644 (file)
@@ -1543,7 +1543,7 @@ extern struct type *lookup_typename (const struct language_defn *,
                                     const struct block *, int);
 
 extern struct type *lookup_template_type (char *, struct type *,
-                                         struct block *);
+                                         const struct block *);
 
 extern int get_vptr_fieldno (struct type *, struct type **);
 
index c3171c381b7026f0bbf3622d41729169c7ea6fa4..18669fc68536102e74fe88747e9113c64f9d02dc 100644 (file)
@@ -1362,7 +1362,7 @@ build_packaged_name (const char *package, int package_len,
    to mean the global scope.  */
 
 static int
-package_name_p (const char *name, struct block *block)
+package_name_p (const char *name, const struct block *block)
 {
   struct symbol *sym;
   int is_a_field_of_this;
@@ -1402,7 +1402,7 @@ classify_unsafe_function (struct stoken function_name)
    The result is one of NAME, NAME_OR_INT, or TYPENAME.  */
 
 static int
-classify_packaged_name (struct block *block)
+classify_packaged_name (const struct block *block)
 {
   char *copy;
   struct symbol *sym;
@@ -1430,7 +1430,7 @@ classify_packaged_name (struct block *block)
    The result is one of NAME, NAME_OR_INT, or TYPENAME.  */
 
 static int
-classify_name (struct block *block)
+classify_name (const struct block *block)
 {
   struct type *type;
   struct symbol *sym;
index e42a03c6aa1ffae2ec13e6d9ea49cef383d50dba..2dbaffdb021bd22e2bb10910d53750dff1cdb60c 100644 (file)
@@ -82,7 +82,7 @@ static const struct objfile_data *objc_objfile_data;
    suitably defined.  */
 
 struct symbol *
-lookup_struct_typedef (char *name, struct block *block, int noerr)
+lookup_struct_typedef (char *name, const struct block *block, int noerr)
 {
   struct symbol *sym;
 
index 1feeca4fa6ab7e3999a7f881ee1582ff90bb7880..47fbae9ff7a805e2e44b4c538b0a54028ca5f214 100644 (file)
@@ -46,7 +46,7 @@ extern void start_msglist (void);
 extern void add_msglist (struct stoken *str, int addcolon);
 extern int end_msglist (void);
 
-struct symbol *lookup_struct_typedef (char *name, struct block *block,
+struct symbol *lookup_struct_typedef (char *name, const struct block *block,
                                      int noerr);
 
 #endif
index afe1c18492cd0e796dada72c8752967a8d977d6c..0392c6a3652abd5f04927f47b7a89bf1e56818c6 100644 (file)
@@ -71,9 +71,9 @@ const struct exp_descriptor exp_descriptor_standard =
 struct expression *expout;
 int expout_size;
 int expout_ptr;
-struct block *expression_context_block;
+const struct block *expression_context_block;
 CORE_ADDR expression_context_pc;
-struct block *innermost_block;
+const struct block *innermost_block;
 int arglist_len;
 static struct type_stack type_stack;
 char *lexptr;
@@ -116,7 +116,7 @@ static int prefixify_subexp (struct expression *, struct expression *, int,
                             int);
 
 static struct expression *parse_exp_in_context (char **, CORE_ADDR,
-                                               struct block *, int, 
+                                               const struct block *, int, 
                                                int, int *);
 
 void _initialize_parse (void);
@@ -248,7 +248,7 @@ write_exp_elt_sym (struct symbol *expelt)
 }
 
 void
-write_exp_elt_block (struct block *b)
+write_exp_elt_block (const struct block *b)
 {
   union exp_element tmp;
 
@@ -1097,7 +1097,8 @@ prefixify_subexp (struct expression *inexpr,
    If COMMA is nonzero, stop if a comma is reached.  */
 
 struct expression *
-parse_exp_1 (char **stringptr, CORE_ADDR pc, struct block *block, int comma)
+parse_exp_1 (char **stringptr, CORE_ADDR pc, const struct block *block,
+            int comma)
 {
   return parse_exp_in_context (stringptr, pc, block, comma, 0, NULL);
 }
@@ -1110,7 +1111,7 @@ parse_exp_1 (char **stringptr, CORE_ADDR pc, struct block *block, int comma)
    is left untouched.  */
 
 static struct expression *
-parse_exp_in_context (char **stringptr, CORE_ADDR pc, struct block *block,
+parse_exp_in_context (char **stringptr, CORE_ADDR pc, const struct block *block,
                      int comma, int void_context_p, int *out_subexp)
 {
   volatile struct gdb_exception except;
index c889d56e0b001609a228dd10f0d3f30c6f6af395..6dd5329b6a43f36ec165eca3e248eb5419a14040 100644 (file)
@@ -41,7 +41,7 @@ extern int expout_ptr;
 /* If this is nonzero, this block is used as the lexical context
    for symbol names.  */
 
-extern struct block *expression_context_block;
+extern const struct block *expression_context_block;
 
 /* If expression_context_block is non-zero, then this is the PC within
    the block that we want to evaluate expressions at.  When debugging
@@ -51,12 +51,12 @@ extern CORE_ADDR expression_context_pc;
 
 /* The innermost context required by the stack and register variables
    we've encountered so far.  */
-extern struct block *innermost_block;
+extern const struct block *innermost_block;
 
 /* The block in which the most recently discovered symbol was found.
    FIXME: Should be declared along with lookup_symbol in symtab.h; is not
    related specifically to parsing.  */
-extern struct block *block_found;
+extern const struct block *block_found;
 
 /* Number of arguments seen so far in innermost function call.  */
 extern int arglist_len;
@@ -191,7 +191,7 @@ void write_exp_string_vector (int type, struct stoken_vector *vec);
 
 extern void write_exp_bitstring (struct stoken);
 
-extern void write_exp_elt_block (struct block *);
+extern void write_exp_elt_block (const struct block *);
 
 extern void write_exp_elt_objfile (struct objfile *objfile);
 
index 7a669f125e0b57d4634e54135118eb067aafb93d..143bd0eaec80852da1e7a41ce43d31af5b74a23b 100644 (file)
@@ -145,7 +145,7 @@ struct display
     struct program_space *pspace;
 
     /* Innermost block required by this expression when evaluated.  */
-    struct block *block;
+    const struct block *block;
 
     /* Status of this display (enabled or disabled).  */
     int enabled_p;
index c4bd13da8d223dc992a3c818601a7b4ee7a850ab..dee47a97b1b0839c04f4f48e0abba2b9a0e150fc 100644 (file)
@@ -62,6 +62,7 @@
 #include "macroscope.h"
 
 #include "psymtab.h"
+#include "parser-defs.h"
 
 /* Prototypes for local functions */
 
index 0d24cb5d0d3b394091a5aae3729855747ea2c5e7..d1cbef509b66fd98a0b254551ba82b66657811ad 100644 (file)
@@ -980,11 +980,11 @@ extern struct symbol *lookup_block_symbol (const struct block *, const char *,
 
 /* lookup a [struct, union, enum] by name, within a specified block.  */
 
-extern struct type *lookup_struct (const char *, struct block *);
+extern struct type *lookup_struct (const char *, const struct block *);
 
-extern struct type *lookup_union (const char *, struct block *);
+extern struct type *lookup_union (const char *, const struct block *);
 
-extern struct type *lookup_enum (const char *, struct block *);
+extern struct type *lookup_enum (const char *, const struct block *);
 
 /* from blockframe.c: */
 
index 502fb0d1f07112a2b68a75216be5ae0cf7b5c697..1dd25799bfceb067f8b8f8face1781dc5a9fdae0 100644 (file)
@@ -1516,7 +1516,7 @@ value_of_variable (struct symbol *var, const struct block *b)
 }
 
 struct value *
-address_of_variable (struct symbol *var, struct block *b)
+address_of_variable (struct symbol *var, const struct block *b)
 {
   struct type *type = SYMBOL_TYPE (var);
   struct value *val;
index 368593574938870bb59ad8db2e2601957616efe2..7a237153517f3f9a68108b2bcbc760a7cd9f2985 100644 (file)
@@ -557,7 +557,8 @@ extern CORE_ADDR address_from_register (struct type *type, int regnum,
 extern struct value *value_of_variable (struct symbol *var,
                                        const struct block *b);
 
-extern struct value *address_of_variable (struct symbol *var, struct block *b);
+extern struct value *address_of_variable (struct symbol *var,
+                                         const struct block *b);
 
 extern struct value *value_of_register (int regnum, struct frame_info *frame);
 
index 669969961ebcef77ca2145cd57db8865c0710439..130f438f2d7a90f8e1d2eb66b888faa927c4d003 100644 (file)
@@ -84,7 +84,7 @@ struct varobj_root
   struct expression *exp;
 
   /* Block for which this expression is valid.  */
-  struct block *valid_block;
+  const struct block *valid_block;
 
   /* The frame for this expression.  This field is set iff valid_block is
      not NULL.  */
This page took 0.067396 seconds and 4 git commands to generate.